![]() |
ARSA Language
2.8
(Encryption, GPU and Web 3.0)
|
#include <string.h>
Public Member Functions | |
| char | charat (const char *str, int index) |
| Returns character at index. More... | |
| *int | size (const char *str) |
| Returns length of the string's content. More... | |
| const char * | replace (const char *str, const char *toReplace, const char *replaceWith) |
| Replaces all instances of a string with another one. More... | |
| const char * | sub (const char *str, int begin, int length) |
| Returns a substring. More... | |
| const char * | erase (const char *str, int index) |
| const char * | trim (const char *str) |
| const char * | lower (const char *str) |
| Makes the string lower case. More... | |
| const char * | upper (const char *str) |
| Makes the string upper case. More... | |
| bool | empty (const char *str) |
| Informs if the string is empty or not. More... | |
| int | find (const char *str, const char *another, int start=0) |
| finds another string in this string More... | |
| const char * | cat (const char *str, const char *strcat1,...) |
| The function concatenates the str string and the strcat string, and the result is stored in return string. More... | |
| const char * | strip (const char *str) |
| The strip removes any whitespace at start and end characters. More... | |
| int | tok (const char *str, const char *tok_chars=" |,", bool use_all_tok_chars=false) |
| const char * | tokn (const char *str, int num, const char *tok_chars=" |,", bool use_all_tok_chars=false) |
| bool | tofile (const char *filename, const char *str, bool append=false, const char *encode="utf8") |
| Save string to file. More... | |
| bool | cmp (const char *str1, const char *str2) |
| string compare between str1 and str2. More... | |
| const char * | replacewhitespace (const char *str) |
| replace string \t\n\r\0 to whitespace programming code. More... | |
| const char * | addprefix (const char *src, const char *prefix) |
| add prefix to string. More... | |
| const char * | addsuffix (const char *src, const char *suffix) |
| add suffix to string. More... | |
| int | findlast (const char *str, const char *findwhat) |
| finds position the ended string by string. More... | |
| const char * | findclearlast (const char *str, const char *findwhat) |
| finds and clear string at last position. More... | |
| const char * | findclearfirst (const char *str, const char *findwhat) |
| finds and clear string at first position. More... | |
| const char * | base64encode (const char *str) |
| base64 encode More... | |
| const char * | base64decode (const char *str) |
| base64 decode More... | |
| const char * | urlencode (const char *str) |
| url encode More... | |
| const char * | urldecode (const char *str) |
| url decode More... | |
| const char * | hexencode (const char *str) |
| hex encode More... | |
| const char * | hexdecode (const char *str) |
| hex decode More... | |
| const char * | decencode (const char *str) |
| dec encode More... | |
| const char * | decdecode (const char *str) |
| dec decode More... | |
| const char * | binaryencode (const char *str) |
| binary encode More... | |
| const char * | binarydecode (const char *str) |
| binary decode More... | |
| const char * | zip (const char *str, const char *aliasname=0, const char *password=0, int ram=16834, int compress_level=-1) |
| const char * | unzip (const char *str, const char *aliasname=0, const char *password=0, int ram=16834) |
| decompress string in a zip file, option: another way if you want to open its then use faddzip(), fadd() More... | |
| const char * | compress (const char *str, int ram=16834, bool speed=false) |
| compress string More... | |
| const char * | uncompress (const char *str, int ram=16834) |
| uncompress string More... | |
| const char * | crc32 (const char *str) |
| get crc32 More... | |
| const char * | md5 (const char *str) |
| get md5 More... | |
| const char * | sha256 (const char *str) |
| get sha256 More... | |
| const char * | encryption (const char *str, const char *layer, const char *password=0, int ram=16834, bool finalize=true) |
| encryption string More... | |
| const char * | decryption (const char *str, const char *layer, const char *password=0, int ram=16834, bool finalize=true) |
| decryption string More... | |
| const char * | encryption2 (const char *str, int ram=16834) |
| encryption string with algotithms version 2 More... | |
| const char * | decryption2 (const char *str, int ram=16834) |
| decryption string with algotithms version 2 More... | |
| bool | isurl (const char *str) |
| check string is valid url More... | |
| bool | isemail (const char *str) |
| check string is valid email More... | |
| const char* string::addprefix | ( | const char * | src, |
| const char * | prefix | ||
| ) |
| const char* string::addsuffix | ( | const char * | src, |
| const char * | suffix | ||
| ) |
| const char* string::base64decode | ( | const char * | str | ) |
base64 decode
| str | string that want decode. |
| const char* string::base64encode | ( | const char * | str | ) |
base64 encode
| str | string that want encode. |
| const char* string::binarydecode | ( | const char * | str | ) |
binary decode
| str | string that binary decode. |
| const char* string::binaryencode | ( | const char * | str | ) |
binary encode
| str | string that binary encode. |
| const char* string::cat | ( | const char * | str, |
| const char * | strcat1, | ||
| ... | |||
| ) |
The function concatenates the str string and the strcat string, and the result is stored in return string.
| str | original string |
| strcat1 | cat string, can send more parameters for strcat. |
| char string::charat | ( | const char * | str, |
| int | index | ||
| ) |
| bool string::cmp | ( | const char * | str1, |
| const char * | str2 | ||
| ) |
string compare between str1 and str2.
| str1 | string1 |
| str2 | string2 |
| const char* string::compress | ( | const char * | str, |
| int | ram = 16834, |
||
| bool | speed = false |
||
| ) |
| const char* string::crc32 | ( | const char * | str | ) |
| const char* string::decdecode | ( | const char * | str | ) |
| const char* string::decencode | ( | const char * | str | ) |
| const char* string::decryption | ( | const char * | str, |
| const char * | layer, | ||
| const char * | password = 0, |
||
| int | ram = 16834, |
||
| bool | finalize = true |
||
| ) |
decryption string
| str | string to decryption. |
| layer | is alphabet only: a...z, not a number, recommended is 5 digits, if more layer then very slow encrypt and decrypt. |
| password | decryption password |
| ram | buffer in byte, default 16k |
| finalize | decryption with finalize processing (when encryption must same flags), secured but very slow |
| const char* string::decryption2 | ( | const char * | str, |
| int | ram = 16834 |
||
| ) |
decryption string with algotithms version 2
| str | string to decryption. |
| ram | buffer in byte, default 16k |
| bool string::empty | ( | const char * | str | ) |
| const char* string::encryption | ( | const char * | str, |
| const char * | layer, | ||
| const char * | password = 0, |
||
| int | ram = 16834, |
||
| bool | finalize = true |
||
| ) |
encryption string
| str | string to encryption. |
| layer | layer is alphabet only: a...z, not a number, recommended is 5 digits, if more layer then very slow encrypt and decrypt. |
| password | encryption password |
| ram | buffer in byte, default 16k |
| finalize | encryption with finalize processing (when decryption must same flags), secured but very slow |
| const char* string::encryption2 | ( | const char * | str, |
| int | ram = 16834 |
||
| ) |
encryption string with algotithms version 2
| str | string to encryption. |
| ram | buffer in byte, default 16k |
| const char* string::erase | ( | const char * | str, |
| int | index | ||
| ) |
Erases a character from the string.
May be slow, because all elements following after the erased element have to be copied.
| str | original string |
| index | Index of element to be erased. |
| const char* string::findclearfirst | ( | const char * | str, |
| const char * | findwhat | ||
| ) |
finds and clear string at first position.
| str | original string. |
| findwhat | string finding. |
| const char* string::findclearlast | ( | const char * | str, |
| const char * | findwhat | ||
| ) |
finds and clear string at last position.
| str | original string. |
| findwhat | string finding. |
| int string::findlast | ( | const char * | str, |
| const char * | findwhat | ||
| ) |
| const char* string::hexdecode | ( | const char * | str | ) |
| const char* string::hexencode | ( | const char * | str | ) |
| bool string::isemail | ( | const char * | str | ) |
check string is valid email
| str | string for checking is email. |
| bool string::isurl | ( | const char * | str | ) |
check string is valid url
| str | string for checking is url. |
| const char* string::lower | ( | const char * | str | ) |
| const char* string::md5 | ( | const char * | str | ) |
| const char* string::replace | ( | const char * | str, |
| const char * | toReplace, | ||
| const char * | replaceWith | ||
| ) |
Replaces all instances of a string with another one.
| str | original string |
| toReplace | The string to replace. |
| replaceWith | The string replacing the old one. |
| const char* string::replacewhitespace | ( | const char * | str | ) |
replace string \t\n\r\0 to whitespace programming code.
| str | original string under \"..."\ power quote |
| const char* string::sha256 | ( | const char * | str | ) |
| * int string::size | ( | const char * | str | ) |
| const char* string::strip | ( | const char * | str | ) |
The strip removes any whitespace at start and end characters.
| str | original string |
| bool string::tofile | ( | const char * | filename, |
| const char * | str, | ||
| bool | append = false, |
||
| const char * | encode = "utf8" |
||
| ) |
Save string to file.
| filename | filename save on disk |
| str | original string |
| append | save string append or renew file before saving |
| encode | force encoding string to. default: utf8, (ascii for binary file) auto ascii utf8 utf16 utf32 wchar |
| int string::tok | ( | const char * | str, |
| const char * | tok_chars = " |,", |
||
| bool | use_all_tok_chars = false |
||
| ) |
The string token from start to end with specific characters.
RECOMMENDED: use string.tokn() instread this function.
| str | original string |
| tok_chars | character is tokenization default is " |," |
| use_all_tok_chars | enable all char in tok_chars be token word. |
| const char* string::tokn | ( | const char * | str, |
| int | num, | ||
| const char * | tok_chars = " |,", |
||
| bool | use_all_tok_chars = false |
||
| ) |
The string token from start to end with specific characters.
and return string in slot that user enter as num.
| str | original string |
| num | array slot that user want after token done. |
| tok_chars | character is tokenization default is " |," |
| use_all_tok_chars | enable all char in tok_chars be token word. |
| const char* string::trim | ( | const char * | str | ) |
Trims the string.
Removes the whitespace from the begining until the end of the string.
whitespace chars are " \t\n\r"
| str | original string |
| const char* string::uncompress | ( | const char * | str, |
| int | ram = 16834 |
||
| ) |
uncompress string
| str | string that uncompress. |
| ram | buffer in byte, default 16k |
| const char* string::unzip | ( | const char * | str, |
| const char * | aliasname = 0, |
||
| const char * | password = 0, |
||
| int | ram = 16834 |
||
| ) |
decompress string in a zip file, option: another way if you want to open its then use faddzip(), fadd()
| str | string that compress. |
| aliasname | open reference name in zip file, if empty string then used the first file found! |
| password | zip password |
| ram | buffer in byte, default 16k |
| const char* string::upper | ( | const char * | str | ) |
| const char* string::urldecode | ( | const char * | str | ) |
| const char* string::urlencode | ( | const char * | str | ) |
| const char* string::zip | ( | const char * | str, |
| const char * | aliasname = 0, |
||
| const char * | password = 0, |
||
| int | ram = 16834, |
||
| int | compress_level = -1 |
||
| ) |
compress string and put to a zip file, option: after zip() done: another way if you want to open its then use faddzip(), fadd() or unzip()
NOTE: unzip() is only support password, !!! faddzip() or fadd() is not support password from this zip() function!!!
| str | string that compress. |
| aliasname | saving reference name in zip file, can be a empty string then program replace to "-" automatic |
| password | zip password |
| ram | buffer in byte, default 16k |
| compress_level | 0 = no compress, 1 = best speed, 9 = best compression, default: -1 is default compression |