ARSA Language  2.8
(Encryption, GPU and Web 3.0)
string.h
Go to the documentation of this file.
1 
137 class string
138 {
139 public:
140 
142 
152  char charat( const char* str, int index );
153 
155 
164  */
165  int size( const char* str );
166 
168 
179  const char* replace( const char* str, const char* toReplace, const char* replaceWith );
180 
182 
193  const char* sub(const char* str, int begin, int length );
194 
197 
207  const char* erase(const char* str, int index );
208 
212 
216  const char* trim(const char* str);
217 
219 
228  const char* lower(const char* str);
229 
231 
240  const char* upper(const char* str);
241 
243 
253  bool empty(const char* str);
254 
256 
267  int find(const char* str, const char* another, int start = 0);
268 
270 
285  const char* cat(const char* str, const char* strcat1, ...);
286 
288 
292  const char* strip(const char* str);
293 
296 
302  int tok(const char* str, const char* tok_chars = " |,", bool use_all_tok_chars = false);
303 
306 
320  const char* tokn(const char* str, int num, const char* tok_chars = " |,", bool use_all_tok_chars = false);
321 
323 
338  bool tofile(const char* filename, const char* str, bool append = false, const char* encode = "utf8");
339 
341 
346  bool cmp(const char* str1, const char* str2);
347 
349 
358  const char* replacewhitespace(const char* str);
359 
361 
371  const char* addprefix(const char* src, const char* prefix);
372 
374 
384  const char* addsuffix(const char* src, const char* suffix);
385 
387 
397  int findlast(const char* str, const char* findwhat);
398 
400 
410  const char* findclearlast(const char* str, const char* findwhat);
411 
413 
423  const char* findclearfirst(const char* str, const char* findwhat);
424 
426 
435  const char* base64encode(const char* str);
436 
438 
446  const char* base64decode(const char* str);
447 
449 
458  const char* urlencode(const char* str);
459 
461 
469  const char* urldecode(const char* str);
470 
472 
481  const char* hexencode(const char* str);
482 
484 
492  const char* hexdecode(const char* str);
493 
495 
504  const char* decencode(const char* str);
505 
507 
515  const char* decdecode(const char* str);
516 
518 
527  const char* binaryencode(const char* str);
528 
530 
538  const char* binarydecode(const char* str);
539 
542 
555  const char* zip(const char* str, const char* aliasname = 0, const char* password = 0, int ram = 16834, int compress_level = -1);
556 
558 
569  const char* unzip(const char* str, const char* aliasname = 0, const char* password = 0, int ram = 16834);
570 
572 
583  const char* compress(const char* str, int ram = 16834, bool speed = false);
584 
586 
595  const char* uncompress(const char* str, int ram = 16834);
596 
598 
607  const char* crc32(const char* str);
608 
610 
619  const char* md5(const char* str);
620 
622 
631  const char* sha256(const char* str);
632 
634 
646  const char* encryption(const char* str, const char* layer, const char* password = 0, int ram = 16834, bool finalize = true);
647 
649 
661  const char* decryption(const char* str, const char* layer, const char* password = 0, int ram = 16834, bool finalize = true);
662 
664 
673  const char* encryption2(const char* str, int ram = 16834);
674 
676 
685  const char* decryption2(const char* str, int ram = 16834);
686 
688 
692  bool isurl(const char* str);
693 
695 
699  bool isemail(const char* str);
700 
701 };
const char * hexencode(const char *str)
hex encode
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(),...
bool tofile(const char *filename, const char *str, bool append=false, const char *encode="utf8")
Save string to file.
bool cmp(const char *str1, const char *str2)
string compare between str1 and str2.
const char * decryption(const char *str, const char *layer, const char *password=0, int ram=16834, bool finalize=true)
decryption string
*int size(const char *str)
Returns length of the string's content.
const char * base64encode(const char *str)
base64 encode
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 st...
const char * encryption2(const char *str, int ram=16834)
encryption string with algotithms version 2
const char * uncompress(const char *str, int ram=16834)
uncompress string
const char * binaryencode(const char *str)
binary encode
const char * compress(const char *str, int ram=16834, bool speed=false)
compress string
const char * sub(const char *str, int begin, int length)
Returns a substring.
const char * findclearlast(const char *str, const char *findwhat)
finds and clear string at last position.
const char * decdecode(const char *str)
dec decode
const char * addsuffix(const char *src, const char *suffix)
add suffix to string.
const char * tokn(const char *str, int num, const char *tok_chars=" |,", bool use_all_tok_chars=false)
const char * replace(const char *str, const char *toReplace, const char *replaceWith)
Replaces all instances of a string with another one.
const char * upper(const char *str)
Makes the string upper case.
const char * binarydecode(const char *str)
binary decode
int findlast(const char *str, const char *findwhat)
finds position the ended string by string.
const char * base64decode(const char *str)
base64 decode
const char * lower(const char *str)
Makes the string lower case.
const char * erase(const char *str, int index)
const char * trim(const char *str)
bool empty(const char *str)
Informs if the string is empty or not.
const char * encryption(const char *str, const char *layer, const char *password=0, int ram=16834, bool finalize=true)
encryption string
char charat(const char *str, int index)
Returns character at index.
const char * strip(const char *str)
The strip removes any whitespace at start and end characters.
int tok(const char *str, const char *tok_chars=" |,", bool use_all_tok_chars=false)
const char * urlencode(const char *str)
url encode
bool isurl(const char *str)
check string is valid url
const char * sha256(const char *str)
get sha256
const char * zip(const char *str, const char *aliasname=0, const char *password=0, int ram=16834, int compress_level=-1)
bool isemail(const char *str)
check string is valid email
const char * crc32(const char *str)
get crc32
Definition: string.h:137
const char * findclearfirst(const char *str, const char *findwhat)
finds and clear string at first position.
const char * addprefix(const char *src, const char *prefix)
add prefix to string.
const char * md5(const char *str)
get md5
const char * decencode(const char *str)
dec encode
int find(const char *str, const char *another, int start=0)
finds another string in this string
const char * replacewhitespace(const char *str)
replace string \t\n\r\0 to whitespace programming code.
const char * hexdecode(const char *str)
hex decode
const char * urldecode(const char *str)
url decode
const char * decryption2(const char *str, int ram=16834)
decryption string with algotithms version 2