String Handling Routines: Difference between revisions
imported>Bale mNo edit summary |
imported>StDoodle mNo edit summary |
||
Line 9: | Line 9: | ||
{{Flink|int [item]|extract_items|desc=Parses a string for items and their amounts (handles plural & singular forms) and returns the results as a map.}} | {{Flink|int [item]|extract_items|desc=Parses a string for items and their amounts (handles plural & singular forms) and returns the results as a map.}} | ||
{{Flink|int|length|string|desc=Returns the number of characters in the specified string.}} | {{Flink|int|length|string|desc=Returns the number of characters in the specified string.}} | ||
{{Flink|string|char_at|string|index|desc=Returns the character at a specified index in a string.}} | |||
{{Flink|int|index_of|string|string|{{opt|int}}|desc=Returns the position of the second string in the first (or -1 if not found), optionally starting its search from a given position.}} | {{Flink|int|index_of|string|string|{{opt|int}}|desc=Returns the position of the second string in the first (or -1 if not found), optionally starting its search from a given position.}} | ||
{{Flink|int|last_index_of|string|string|desc=Returns the last index of the second string in the first.}} | {{Flink|int|last_index_of|string|string|desc=Returns the last index of the second string in the first.}} |
Revision as of 20:20, 28 November 2010
Simple
string to_lower_case( string )
string to_upper_case( string )
string today_to_string()
string to_url( location )
boolean contains_text( string, string )
int [item] extract_items()
int length( string )
string char_at( string, index )
int index_of( string, string, [int] )
int last_index_of( string, string )
string substring( string, int, [int] )
buffer replace_string( buffer, string, string )
buffer replace_string( string, string, string )
buffer replace( buffer, int, int, string )
string url_encode( string )
string url_decode( string )
string [int] split_string( string, [string] )
string [int] session_logs( [string], int )
buffer append( buffer, string )
void set_length( buffer, int )
buffer delete( buffer, int, int )
buffer insert( buffer, int, string )
Regular Expressions
It is advised that anyone desiring to use these functions should first understand the basics of Regular Expressions and how these functions implement that language.
matcher create_matcher( string, string )
matcher reset( matcher, [string] )
string [int,int] group_string( string, string )
boolean find( matcher )
string group( matcher, [int] )
string replace_all( matcher, string )
string replace_first( matcher, string )
buffer append_replacement( matcher, buffer, string )
buffer append_tail( matcher, buffer )