This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| pf:prpldocs:strings [2016/06/23 17:19] – created virgilw | pf:prpldocs:strings [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| <a href="#" | <a href="#" | ||
| - | Save the contents to "Vars and Functions.txt" | + | Save the contents to "Strings.txt" | 
| <div id=" | <div id=" | ||
| </ | </ | ||
| < | < | ||
| + | =CMD | ||
| + | =COMMAND Concat (string string) string | ||
| + | =DESC | ||
| + | Takes the first two items from the stack and concatenates them. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace(Concat(" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| =CMD | =CMD | ||
| - | =COMMAND  | + | =COMMAND  | 
| - | =DESC | + | =DESC | 
| + | String, Arg1: string to find substring from | ||
| + | Int, Arg2: index for the start of the substring (the first character of a string has index 0) | ||
| + | Int, Arg3: length of the substring | ||
| TODO | TODO | ||
| =ENDDESC | =ENDDESC | ||
| =EX | =EX | ||
| - | TODO | + | Trace( Substring(" | 
| =ENDEX | =ENDEX | ||
| =ENDCMD | =ENDCMD | ||
| - | </ | + | =CMD | 
| + | =COMMAND StartsWith (string string) bool | ||
| + | =DESC | ||
| + | Takes two strings from the stack and returns whether the first string starts with the second (case sensitive) | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | if (StartsWith(" | ||
| + |     Trace(" | ||
| + | endif | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND EndsWith (string string) bool | ||
| + | =DESC | ||
| + | Takes two strings from the stack and returns whether the first string ends with the second (case sensitive) | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | if (EndsWith(" | ||
| + |     Trace(" | ||
| + | endif | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND Split (string string) list | ||
| + | =DESC | ||
| + | Takes two strings from the stack and splits the first wherever the second occurs. Returns a list of strings. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Split(" | ||
| + | < | ||
| + | 	Trace(< | ||
| + | loop | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND StringToList (string) list | ||
| + | =DESC | ||
| + | Takes a string from the stack and returns the list of characters in the string. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | StringToList(" | ||
| + | < | ||
| + | 	Trace(< | ||
| + | loop | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND ToUpper (string) string | ||
| + | =DESC | ||
| + | Converts a string to uppercase. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace( ToUpper(" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND ToLower (string) string | ||
| + | =DESC | ||
| + | Converts a string to lowercase. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace( ToLower(" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND StringLength (string) int | ||
| + | =DESC | ||
| + | Returns the number of characters in a string. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace( StringLength (" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND StringReplace (string string string) string | ||
| + | =DESC | ||
| + | string ARG1: The string to be searched | ||
| + | string ARG2: The string to search for in ARG1 | ||
| + | string ARG3: The string to replace ARG2 with | ||
| + | |||
| + | Searches a string for all instances for another string, and replaces them with a different string. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace(StringReplace (" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND CR string | ||
| + | =DESC | ||
| + | Pushes a carriage return to the stack. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace( Concat (Concat(" | ||
| + | =ENDEX | ||
| + | =ENDCMD | ||
| + | |||
| + | =CMD | ||
| + | =COMMAND LF string | ||
| + | =DESC | ||
| + | Pushes a line feed to the stack. | ||
| + | =ENDDESC | ||
| + | =EX | ||
| + | Trace( Concat (Concat(" | ||
| + | =ENDEX | ||
| + | =ENDCMD</ | ||
| < | < | ||