String libary

String.FromChar

String.IndexOf

String.LastIndexOf

String.Left

String.Merge

String.Replace

String.Right

String.Split

String.Sub

String.ToChar

String.ToLower

String.ToUpper

String.Trim

String.TrimLeft

String.TrimRight


String.FromChar


Useage: String.FromChar(Number num)
Returns: String
Description: Returns a string with the letter build from the number
Code example: String.FromChar(97)
Return value: "a"

String.IndexOf


 
Useage: String.IndexOf(String str, String needle)
Returns: Number
Description: Returns the position of where the string or character is located
Code example: String.IndexOf("hello", "o")
Return value: 4
 
 
Useage: String.IndexOf(String str, String needle, Number startpos)
Returns: Number
Description: Returns the position of where the string or character is located
Code example: String.IndexOf("hello kittah", "h", 5)
Return value: 11

String.LastIndexOf


 
Useage: String.LastIndexOf(String str, String needle)
Returns: Number
Description: Returns the last position of where the string or character is located
Code example: String.LastIndexOf("hellooo", "o")
Return value: 6
 
 
Useage: String.LastIndexOf(String str, String needle, Number startpos)
Returns: Number
Description: Returns the last position of where the string or character is located
Code example: String.LastIndexOf("hello kittahhh", "h", 5)
Return value: 13

String.Left


Useage: String.Left(String str, Number offset)
Returns: String
Description: Alias of String.Sub(str, offset)
Code example: String.Left("hello", 1)
Return value: "ello"

String.Merge


Useage: String.Merge(Table parts, String seperator)
Returns: String
Description: Merges the Table with the Seperator between the parts
Code example: String.Merge({"a", "b",
( ! ) Notice: Undefined offset: 2 in E:\web\BS\page\Libaries.php on line 104
Call Stack
#TimeMemoryFunctionLocation
10.0004379848{main}( )...\index.php:0
20.0018440704include( 'E:\web\BS\page\Libaries.php' )...\index.php:83
"c",
( ! ) Notice: Undefined offset: 3 in E:\web\BS\page\Libaries.php on line 104
Call Stack
#TimeMemoryFunctionLocation
10.0004379848{main}( )...\index.php:0
20.0018440704include( 'E:\web\BS\page\Libaries.php' )...\index.php:83
"d",
( ! ) Notice: Undefined offset: 4 in E:\web\BS\page\Libaries.php on line 104
Call Stack
#TimeMemoryFunctionLocation
10.0004379848{main}( )...\index.php:0
20.0018440704include( 'E:\web\BS\page\Libaries.php' )...\index.php:83
"e"},
( ! ) Notice: Undefined offset: 5 in E:\web\BS\page\Libaries.php on line 104
Call Stack
#TimeMemoryFunctionLocation
10.0004379848{main}( )...\index.php:0
20.0018440704include( 'E:\web\BS\page\Libaries.php' )...\index.php:83
".")
Return value: "a.b.c.d.e"
Notes: Since strings are ended with NULL characters, it's a bad idea to use \0 as seperator.

String.Replace


Useage: String.Replace(String str, String needle, String inserted)
Returns: String
Description: Returns a string with the needles replaced
Code example: String.Replace("Bromvlieg is horrible", "horrible", "awesome")
Return value: "Bromvlieg is awesome"


String.Split


Useage: String.Split(String str, String needle)
Returns: Table
Description: Splits the string based on the needle.
Code example: String.Split("a.b.c.d.e", ".")
Return value: {"a", "b", "c", "d", "e"}
Notes: Since strings are ended with NULL characters, it's a bad idea to use \0 as needle.

String.Sub


 
Useage: String.Sub(String str, Number startpos)
Returns: String
Description: Returns a part of the string based on the arguments given
Code example: String.Sub("hello world", 6)
Return value: "world"
 
 
Useage: String.Sub(String str, Number startpos, Number length)
Returns: String
Description: Returns a part of the string based on the arguments given
Code example: String.Sub("hello world", 0, 5)
Return value: "hello"

String.ToChar


Useage: String.ToChar(String str)
Returns: Number
Description: Returns the letter in number format
Code example: String.ToChar("a")
Return value: 97

String.ToLower


Useage: String.ToLower(String str)
Returns: String
Description: Forces all upper case letter to lower case.
Code example: String.ToLower("HELLO")
Return value: "hello"

String.ToUpper


Useage: String.ToUpper(String str)
Returns: String
Description: Forces all lower case letter to uppwer case.
Code example: String.ToUpper("hello")
Return value: "HELLO"

String.Trim


 
Useage: String.Trim(String str)
Returns: String
Description: Returns a trimmed string, left and right side are trimmed of the following characters: \r \n \t and spaces.
Code example: String.Trim("\n\r\t hello \t \n \r \n")
Return value: "hello"
 
 
Useage: String.Trim(String str, String chars)
Returns: String
Description: Returns a trimmed string, left and right side are trimmed of the characters entered.
Code example: String.Trim("\n\r\t hello \t \n \r \n", "\r\n\t hel")
Return value: "o"

String.TrimLeft


 
Useage: String.TrimLeft(String str)
Returns: String
Description: Returns a trimmed string, left side is trimmed of the following characters: \r \n \t and spaces.
Code example: String.TrimLeft("\n\r\t hello \t \n \r \n")
Return value: "hello \t \n \r \n"
 
 
Useage: String.TrimLeft(String str, String chars)
Returns: String
Description: Returns a trimmed string, left side is trimmed of the characters entered.
Code example: String.TrimLeft("\n\r\t hello \t \n \r \n", "\r\n\t hel")
Return value: "o \t \n \r \n", "\r\n\t hel"

String.TrimRight


 
Useage: String.TrimRight(String str)
Returns: String
Description: Returns a trimmed string, right side is trimmed of the following characters: \r \n \t and spaces.
Code example: String.TrimRight("\n\r\t hello \t \n \r \n")
Return value: "\n\r\t hello"
 
 
Useage: String.TrimRight(String str, String chars)
Returns: String
Description: Returns a trimmed string, right side is trimmed of the characters entered.
Code example: String.TrimRight("\n\r\t hello \t \n \r \n", "\r\n\t hel")
Return value: "\n\r\t hello"