Go to the first, previous, next, last section, table of contents.


Rewrite Built-in Functions

The following built-in functions are provided:

Function: integer length (string s)
Returns the length of string s.

Function: integer index (string s, integer c)
Returns the index of the first occurrence of the character c in the string s. Returns -1 if no such occurrence is found.

Function: integer rindex (string s, integer i)
Returns the index of the last occurrence of the character c in the string s. Returns -1 if no such occurrence is found.

Function: string substr (string s, integer start, integer length)
Returns the at most length substring of s starting at position start.

Function: integer logit (string msg)
Outputs its argument to the radius log channel info. Returns 0. The function is intended for debugging purposes.

All character positions in strings are counted from 0.


Go to the first, previous, next, last section, table of contents.