Function |
Returns |
Description |
Length(s) |
integer |
Get length of string or element count of array. |
RegexReplace(s, RegEx, Replacement, IgnoreCase) |
string |
Replace instances in string matched by regular expression. Caseless matching if IgnoreCase is True. |
RegexMatch(s, RegEx, IgnoreCase) |
string |
Match first instance in string by regular expression. Caseless matching if IgnoreCase is True. |
RegexMatchAll(s, RegEx, IgnoreCase, &Matches, &Positions) |
bool |
Match all instances in string by regular expression. Caseless matching if IgnoreCase is True.
Matches is array of array of string that receives all matched instances, containing substrings
by regular expression groups. Positions is array of array of integer that receives all matched
instances, containing positions in base string of all matched regular expression groups. Note: see _v function. |
Replace(Text, FromText, ToText) |
string |
Replace occurrences in Text and return resulting string. |
Copy(s, from, count) |
string |
Extract and return substring. |
Pos(substr, s) |
integer |
Return position of substring in string. Returns 0 if not found. |
DeleteStr(&s, from, count) |
none |
Delete substring from string. |
Insert(s, &s2, pos) |
none |
Insert substring in string. |
Uppercase(s) |
string |
Return string converted to uppercase. |
Lowercase(s) |
string |
Return string converted to lowercase. |
Trim(s) |
string |
Remove leading and trailing whitespaces. |
Chr(i) |
char |
Convert character code to character symbol. |
Ord(ch) |
integer |
Convert character symbol to character code. |
Function |
Returns |
Description |
SaveStringToFile(Text, FileName, Encoding) |
bool |
Save string to file. Encoding can be: enAnsi, enUtf8, enUtf8NoBom, enUcs2. |
LoadStringFromFile(FName, Encoding) |
string |
Load string from file. Encoding can be: enAnsi, enUtf8, enUtf8NoBom, enUcs2. |
LoadStringFromFileDetectEncoding(FName, &Encoding) |
string |
Guess file encoding and load string from file. |
ExtractFileName(Path) |
string |
Extract only file name from full path. |
ExtractFilePath(Path) |
string |
Extract only directory from full path. |
ExtractFileExt(Path) |
string |
Extract file extension. |
FileExists(Path) |
bool |
Returns true if file exists in filesystem. |
DirectoryExists(Path) |
bool |
Returns true if directory exists in filesystem. |
LoadFileToBitmap(InputFileName, BM) |
bool |
Load bitmap from file. BM must contain initialized TBitmap object. |
Function |
Returns |
Description |
ExecuteFile(FileName, Parameters) |
none |
Execute/open specified file. |
ExecuteCommand(Command, &OutputText) |
bool |
Execute specified command line and write output to OutputText. Returns true if successful. |
CheckIsPhpAvailable() |
bool |
Returns true if php.exe is available for executing PHP scripts. |
ExecutePhpScript(PhpParameters, ScriptName, ScriptParameters, &OutputText) |
bool |
Execute specified PHP script or Phar and write output to OutputText. Returns true if successful. |