Note: I can't use patterns, and this API don't use any pattern
Download:
http://pastebin.com/h35zq88B
Function listing:
Spoiler
toCharTable("Hello")returns the char table of string
In our example:
{
"H";
"e";
"l";
"l";
"o"
}
fromCharTable({"H";"i"})
returns string created from CharTable
In our Example: "Hi"
separate("09-05-64-72","-")
separates a string (1. arg) with a separator (2. arg)
returns a table
In our example:
{
"09"
"05"
"64"
"72"
}
unseparate({"09";"05";"64";"72"},"-")
returns the original string
1.arg: table
2.arg: separator
In our example returns: "09-05-64-72"
replace("Hello","l","e")
replaces in string(1.arg) character in 2. arg to character in 3.arg
you can use as 3. arg strings, too.
In our example returns: "Heeeo"
indexChar("HELLO",4)
in our example:
returns 4th character of Hello , so character L
credits()
returns credits
Credits:
Spoiler
All credits to me (Konlab)Created by Konlab, inspired by tomass1996's StrUtils API, but don't used any part of that API, I (Konlab) don't saw the StrUtils' code before creating this API, you can edit, redistribute, copy etc. if you give me credits
Current version is 1.0
If you find any bugs/ if you have suggestions, post, and I'll fix/add (if I can do that)