Rudiments

charstring.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_CHARSTRING_H
5 #define RUDIMENTS_CHARSTRING_H
6
7 #include <rudiments/private/charstringincludes.h>
8
16 class RUDIMENTS_DLLSPEC charstring {
17 public:
18
20 static size_t length(const char *string);
21
24 static size_t size(const char *string);
25
27 static bool isNullOrEmpty(const char *string);
28
36 static bool isYes(const char *string);
37
44 static bool isNo(const char *string);
45
47 static void zero(char *str, size_t len);
48
52 static char *append(char *dest, const char *source);
53
57 static char *append(char *dest, const char *source,
58 size_t len);
59
63 static char *append(char *dest, int64_t number);
64
68 static char *append(char *dest, uint64_t number);
69
73 static char *append(char *dest, double number);
74
79 static char *append(char *dest, double number,
80 uint16_t scale);
81
86 static char *append(char *dest, double number,
87 uint16_t precision,
88 uint16_t scale);
89
93 static char *copy(char *dest, const char *source);
94
98 static char *copy(char *dest,
99 const char *source, size_t len);
100
105 static char *copy(char *dest, size_t location,
106 const char *source);
107
112 static char *copy(char *dest, size_t location,
113 const char *source, size_t len);
114
119 static char *safeCopy(char *dest, size_t destlen,
120 const char *source);
121
126 static char *safeCopy(char *dest, size_t destlen,
127 const char *source, size_t sourcelen);
128
131 static int32_t compare(const char *str1, const char *str2);
132
136 static int32_t compare(const char *str1, const char *str2,
137 size_t length);
138
141 static int32_t compareIgnoringCase(const char *str1,
142 const char *str2);
143
147 static int32_t compareIgnoringCase(const char *str1,
148 const char *str2,
149 size_t len);
150
155 static bool inSet(const char *str, const char * const *set);
156
161 static bool inSetIgnoringCase(const char *str,
162 const char * const *set);
163
166 static bool contains(const char *haystack,
167 const char *needle);
168
171 static bool containsIgnoringCase(const char *haystack,
172 const char *needle);
173
176 static bool contains(const char *haystack, char needle);
177
180 static bool containsIgnoringCase(const char *haystack,
181 char needle);
182
185 static bool startsWith(const char *haystack,
186 const char *needle);
187
190 static bool endsWith(const char *haystack,
191 const char *needle);
192
195 static const char *findFirst(const char *haystack,
196 const char *needle);
197
200 static const char *findFirstIgnoringCase(
201 const char *haystack,
202 const char *needle);
203
206 static const char *findFirst(const char *haystack,
207 char needle);
208
211 static const char *findFirstIgnoringCase(
212 const char *haystack,
213 char needle);
214
218 static const char *findFirstOrEnd(const char *haystack,
219 const char *needle);
220
224 static const char *findFirstOrEndIgnoringCase(
225 const char *haystack,
226 const char *needle);
227
231 static const char *findFirstOrEnd(const char *haystack,
232 char needle);
233
237 static const char *findFirstOrEndIgnoringCase(
238 const char *haystack,
239 char needle);
240
243 static const char *findLast(const char *haystack,
244 const char *needle);
245
248 static const char *findLastIgnoringCase(
249 const char *haystack,
250 const char *needle);
251
254 static const char *findLast(const char *haystack,
255 char needle);
256
259 static const char *findLastIgnoringCase(
260 const char *haystack,
261 char needle);
262
265 static char *findFirst(char *haystack, const char *needle);
266
269 static char *findFirstIgnoringCase(char *haystack,
270 const char *needle);
271
274 static char *findFirst(char *haystack, char needle);
275
278 static char *findFirstIgnoringCase(char *haystack,
279 char needle);
280
284 static char *findFirstOrEnd(char *haystack,
285 const char *needle);
286
290 static char *findFirstOrEndIgnoringCase(char *haystack,
291 const char *needle);
292
295 static char *findLast(char *haystack, const char *needle);
296
299 static char *findLastIgnoringCase(char *haystack,
300 const char *needle);
301
304 static char *findLast(char *haystack, char needle);
305
308 static char *findLastIgnoringCase(char *haystack,
309 char needle);
310
314 static const char *findFirstOfSet(const char *haystack,
315 const char *set);
316
320 static char *findFirstOfSet(char *haystack,
321 const char *set);
322
327 static const char *findFirstOfSetOrEnd(
328 const char *haystack,
329 const char *set);
330
335 static char *findFirstOfSetOrEnd(
336 char *haystack,
337 const char *set);
338
342 static const char *findLastOfSet(const char *haystack,
343 const char *set);
344
348 static char *findLastOfSet(char *haystack,
349 const char *set);
350
355 static const char *findLastOfSetOrEnd(
356 const char *haystack,
357 const char *set);
358
363 static char *findLastOfSetOrEnd(
364 char *haystack,
365 const char *set);
366
371 static char *before(const char *str,
372 const char *delimiter);
373
378 static char *between(const char *str,
379 const char *start,
380 const char *end);
381
387 static char *after(const char *str,
388 const char *delimiter);
389
393 static size_t lengthContainingSet(const char *haystack,
394 const char *set);
395
399 static size_t lengthNotContainingSet(const char *haystack,
400 const char *set);
401
406 static char *duplicate(const char *str);
407
413 static char *duplicate(const char *str, size_t len);
414
416 static void upper(char *str);
417
419 static void lower(char *str);
420
423 static void capitalize(char *str);
424
426 static void rightTrim(char *str);
427
430 static void rightTrim(char *str, char character);
431
433 static void leftTrim(char *str);
434
437 static void leftTrim(char *str, char character);
438
440 static void bothTrim(char *str);
441
443 static void bothTrim(char *str, char character);
444
448 static bool strip(char *str, char character);
449
453 static bool strip(char *str1, const char *str2);
454
458 static bool stripSet(char *str1, const char *set);
459
462 static void replace(char *str,
463 char oldchar, char newchar);
464
467 static void replace(char *str,
468 const char *oldchars, char newchar);
469
473 static char *replace(const char *str,
474 const char *oldstr,
475 const char *newstr);
476
484 static char *replace(const char *str,
485 const char * const *oldstrset,
486 ssize_t *oldstrlen,
487 const char * const *newstrset);
488
495 static char *replace(const char *str,
496 regularexpression *from,
497 const char *to,
498 bool global);
499
502 static uint16_t integerLength(int16_t number);
503
506 static uint16_t integerLength(int32_t number);
507
510 static uint16_t integerLength(int64_t number);
511
514 static uint16_t integerLength(uint16_t number);
515
518 static uint16_t integerLength(uint32_t number);
519
522 static uint16_t integerLength(uint64_t number);
523
526 static bool isInteger(const char *val);
527
530 static bool isInteger(const char *val, int32_t len);
531
534 static bool isNumber(const char *val);
535
538 static bool isNumber(const char *val, int32_t len);
539
543 static char *parseNumber(int16_t number);
544
548 static char *parseNumber(uint16_t number);
549
553 static char *parseNumber(int16_t number,
554 uint16_t zeropadding);
555
559 static char *parseNumber(uint16_t number,
560 uint16_t zeropadding);
561
565 static char *parseNumber(int32_t number);
566
570 static char *parseNumber(uint32_t number);
571
575 static char *parseNumber(int32_t number,
576 uint16_t zeropadding);
577
581 static char *parseNumber(uint32_t number,
582 uint16_t zeropadding);
583
587 static char *parseNumber(int64_t number);
588
592 static char *parseNumber(uint64_t number);
593
597 static char *parseNumber(int64_t number,
598 uint16_t zeropadding);
599
603 static char *parseNumber(uint64_t number,
604 uint16_t zeropadding);
605
606
610 static char *parseNumber(float number);
611
615 static char *parseNumber(float number,
616 uint16_t scale);
617
621 static char *parseNumber(float number,
622 uint16_t precision,
623 uint16_t scale);
624
628 static char *parseNumber(double number);
629
633 static char *parseNumber(double number,
634 uint16_t scale);
635
639 static char *parseNumber(double number,
640 uint16_t precision,
641 uint16_t scale);
642
646 static char *parseNumber(long double number);
647
651 static char *parseNumber(long double number,
652 uint16_t scale);
653
657 static char *parseNumber(long double number,
658 uint16_t precision,
659 uint16_t scale);
660
662 static int64_t toInteger(const char *string);
663
667 static int64_t toInteger(const char *string,
668 const char **endptr);
669
671 static int64_t toInteger(const char *string, int32_t base);
672
676 static int64_t toInteger(const char *string,
677 const char **endptr, int32_t base);
678
680 static uint64_t toUnsignedInteger(const char *string);
681
685 static uint64_t toUnsignedInteger(const char *string,
686 const char **endptr);
687
690 static uint64_t toUnsignedInteger(const char *string,
691 int32_t base);
692
697 static uint64_t toUnsignedInteger(const char *string,
698 const char **endptr,
699 int32_t base);
700
701
703 static long double toFloat(const char *string);
704
715 static long double toFloatC(const char *string);
716
720 static long double toFloat(const char *string,
721 const char **endptr);
722
725 static int64_t convertAmount(const char *amount);
726
729 static char *convertAmount(int64_t amount);
730
736 static char *convertAmount(int64_t amount,
737 uint16_t padding);
738
739
743 static char *httpEscape(const char *input);
744
748 static char *httpUnescape(const char *input);
749
754 static char *escape(const char *input,
755 const char *characters);
756
761 static char *unescape(const char *input);
762
766 static void escape(const char *input,
767 uint64_t inputlength,
768 char **output,
769 uint64_t *outputlength,
770 const char *characters);
771
775 static void unescape(const char *input,
776 uint64_t inputlength,
777 char **output,
778 uint64_t *outputlength);
779
783 static char *base64Encode(const unsigned char *input);
784
787 static char *base64Encode(const unsigned char *input,
788 uint64_t inputsize);
789
793 static void base64Encode(const unsigned char *input,
794 uint64_t inputsize,
795 char **output,
796 uint64_t *outputlength);
797
801 static unsigned char *base64Decode(const char *input);
802
805 static unsigned char *base64Decode(const char *input,
806 uint64_t inputlength);
807
811 static void base64Decode(const char *input,
812 uint64_t inputlength,
813 unsigned char **output,
814 uint64_t *outputsize);
815
819 static char *quotedPrintableEncode(
820 const unsigned char *input);
821
824 static char *quotedPrintableEncode(
825 const unsigned char *input,
826 uint64_t inputsize);
827
831 static void quotedPrintableEncode(
832 const unsigned char *input,
833 uint64_t inputsize,
834 char **output,
835 uint64_t *outputlength);
836
840 static unsigned char *quotedPrintableDecode(
841 const char *input);
842
845 static unsigned char *quotedPrintableDecode(
846 const char *input,
847 uint64_t inputlength);
848
852 static void quotedPrintableDecode(const char *input,
853 uint64_t inputlength,
854 unsigned char **output,
855 uint64_t *outputsize);
856
857
861 static char *hexEncode(const unsigned char *input);
862
865 static char *hexEncode(const unsigned char *input,
866 uint64_t inputsize);
867
871 static void hexEncode(const unsigned char *input,
872 uint64_t inputsize,
873 char **output,
874 uint64_t *outputlength);
875
879 static unsigned char *hexDecode(const char *input);
880
883 static unsigned char *hexDecode(const char *input,
884 uint64_t inputlength);
885
889 static void hexDecode(const char *input,
890 uint64_t inputlength,
891 unsigned char **output,
892 uint64_t *outputsize);
893
895 static void obfuscate(char *str);
896
899 static void deobfuscate(char *str);
900
905 static void leftJustify(char *str, int32_t len);
906
911 static void rightJustify(char *str, int32_t len);
912
916 static void center(char *str, int32_t len);
917
924 static char *pad(const char *string,
925 char padchar,
926 int16_t direction,
927 uint64_t totallength);
928
937 static void split(const char *string,
938 ssize_t stringlength,
939 const char *delimiter,
940 ssize_t delimiterlength,
941 bool collapse,
942 char ***list,
943 uint64_t *listlength);
944
952 static void split(const char *string,
953 const char *delimiter,
954 ssize_t delimiterlength,
955 bool collapse,
956 char ***list,
957 uint64_t *listlength);
958
966 static void split(const char *string,
967 ssize_t stringlength,
968 const char *delimiter,
969 bool collapse,
970 char ***list,
971 uint64_t *listlength);
972
980 static void split(const char *string,
981 const char *delimiter,
982 bool collapse,
983 char ***list,
984 uint64_t *listlength);
985
989 static char *subString(const char *str,
990 size_t start, size_t end);
991
995 static char *subString(const char *str, size_t start);
996
999 static char *insertString(const char *dest,
1000 const char *src,
1001 uint64_t index);
1002
1020 static ssize_t printf(char *buffer, size_t len,
1021 const char *format, ...);
1022
1043 static ssize_t printf(char *buffer, size_t len,
1044 const char *format,
1045 va_list *argp);
1046
1058 static ssize_t printf(char **buffer,
1059 const char *format, ...);
1060
1072 static ssize_t printf(char **buffer,
1073 const char *format,
1074 va_list *argp);
1075
1076 #include <rudiments/private/charstring.h>
1077 };
1078
1079 #endif
character
Definition: character.h:11
charstring
Definition: charstring.h:16
charstring::findFirstOrEnd
static const char * findFirstOrEnd(const char *haystack, char needle)
charstring::parseNumber
static char * parseNumber(float number, uint16_t scale)
charstring::subString
static char * subString(const char *str, size_t start, size_t end)
charstring::duplicate
static char * duplicate(const char *str, size_t len)
charstring::isNumber
static bool isNumber(const char *val)
charstring::quotedPrintableDecode
static void quotedPrintableDecode(const char *input, uint64_t inputlength, unsigned char **output, uint64_t *outputsize)
charstring::leftTrim
static void leftTrim(char *str, char character)
charstring::replace
static void replace(char *str, const char *oldchars, char newchar)
charstring::parseNumber
static char * parseNumber(int16_t number)
charstring::hexDecode
static unsigned char * hexDecode(const char *input)
charstring::split
static void split(const char *string, ssize_t stringlength, const char *delimiter, bool collapse, char ***list, uint64_t *listlength)
charstring::split
static void split(const char *string, ssize_t stringlength, const char *delimiter, ssize_t delimiterlength, bool collapse, char ***list, uint64_t *listlength)
charstring::endsWith
static bool endsWith(const char *haystack, const char *needle)
charstring::append
static char * append(char *dest, uint64_t number)
charstring::safeCopy
static char * safeCopy(char *dest, size_t destlen, const char *source)
charstring::findFirst
static const char * findFirst(const char *haystack, const char *needle)
charstring::containsIgnoringCase
static bool containsIgnoringCase(const char *haystack, const char *needle)
charstring::parseNumber
static char * parseNumber(int64_t number, uint16_t zeropadding)
charstring::parseNumber
static char * parseNumber(int32_t number, uint16_t zeropadding)
charstring::copy
static char * copy(char *dest, const char *source, size_t len)
charstring::upper
static void upper(char *str)
charstring::center
static void center(char *str, int32_t len)
charstring::findFirstOrEndIgnoringCase
static const char * findFirstOrEndIgnoringCase(const char *haystack, char needle)
charstring::findFirstIgnoringCase
static const char * findFirstIgnoringCase(const char *haystack, char needle)
charstring::isYes
static bool isYes(const char *string)
charstring::split
static void split(const char *string, const char *delimiter, ssize_t delimiterlength, bool collapse, char ***list, uint64_t *listlength)
charstring::replace
static char * replace(const char *str, const char *const *oldstrset, ssize_t *oldstrlen, const char *const *newstrset)
charstring::length
static size_t length(const char *string)
charstring::parseNumber
static char * parseNumber(uint32_t number, uint16_t zeropadding)
charstring::toUnsignedInteger
static uint64_t toUnsignedInteger(const char *string, const char **endptr)
charstring::findLastIgnoringCase
static const char * findLastIgnoringCase(const char *haystack, char needle)
charstring::parseNumber
static char * parseNumber(uint32_t number)
charstring::rightTrim
static void rightTrim(char *str)
charstring::findLastOfSetOrEnd
static const char * findLastOfSetOrEnd(const char *haystack, const char *set)
charstring::parseNumber
static char * parseNumber(long double number, uint16_t scale)
charstring::rightJustify
static void rightJustify(char *str, int32_t len)
charstring::insertString
static char * insertString(const char *dest, const char *src, uint64_t index)
charstring::integerLength
static uint16_t integerLength(int64_t number)
charstring::convertAmount
static char * convertAmount(int64_t amount)
charstring::base64Encode
static char * base64Encode(const unsigned char *input)
charstring::replace
static char * replace(const char *str, const char *oldstr, const char *newstr)
charstring::toUnsignedInteger
static uint64_t toUnsignedInteger(const char *string)
charstring::bothTrim
static void bothTrim(char *str, char character)
charstring::findFirstIgnoringCase
static char * findFirstIgnoringCase(char *haystack, const char *needle)
charstring::parseNumber
static char * parseNumber(float number)
charstring::printf
static ssize_t printf(char **buffer, const char *format,...)
charstring::findLastOfSet
static const char * findLastOfSet(const char *haystack, const char *set)
charstring::safeCopy
static char * safeCopy(char *dest, size_t destlen, const char *source, size_t sourcelen)
charstring::startsWith
static bool startsWith(const char *haystack, const char *needle)
charstring::parseNumber
static char * parseNumber(uint16_t number, uint16_t zeropadding)
charstring::hexDecode
static void hexDecode(const char *input, uint64_t inputlength, unsigned char **output, uint64_t *outputsize)
charstring::hexEncode
static void hexEncode(const unsigned char *input, uint64_t inputsize, char **output, uint64_t *outputlength)
charstring::parseNumber
static char * parseNumber(int32_t number)
charstring::convertAmount
static int64_t convertAmount(const char *amount)
charstring::findLastIgnoringCase
static char * findLastIgnoringCase(char *haystack, const char *needle)
charstring::hexEncode
static char * hexEncode(const unsigned char *input, uint64_t inputsize)
charstring::toUnsignedInteger
static uint64_t toUnsignedInteger(const char *string, const char **endptr, int32_t base)
charstring::findLastIgnoringCase
static const char * findLastIgnoringCase(const char *haystack, const char *needle)
charstring::toInteger
static int64_t toInteger(const char *string, const char **endptr, int32_t base)
charstring::parseNumber
static char * parseNumber(uint16_t number)
charstring::leftTrim
static void leftTrim(char *str)
charstring::quotedPrintableDecode
static unsigned char * quotedPrintableDecode(const char *input, uint64_t inputlength)
charstring::findLastOfSet
static char * findLastOfSet(char *haystack, const char *set)
charstring::findFirstOfSetOrEnd
static const char * findFirstOfSetOrEnd(const char *haystack, const char *set)
charstring::printf
static ssize_t printf(char *buffer, size_t len, const char *format, va_list *argp)
charstring::append
static char * append(char *dest, double number, uint16_t precision, uint16_t scale)
charstring::rightTrim
static void rightTrim(char *str, char character)
charstring::findFirst
static char * findFirst(char *haystack, const char *needle)
charstring::isNullOrEmpty
static bool isNullOrEmpty(const char *string)
charstring::subString
static char * subString(const char *str, size_t start)
charstring::append
static char * append(char *dest, const char *source)
charstring::lower
static void lower(char *str)
charstring::contains
static bool contains(const char *haystack, char needle)
charstring::compareIgnoringCase
static int32_t compareIgnoringCase(const char *str1, const char *str2, size_t len)
charstring::append
static char * append(char *dest, int64_t number)
charstring::isInteger
static bool isInteger(const char *val)
charstring::quotedPrintableEncode
static void quotedPrintableEncode(const unsigned char *input, uint64_t inputsize, char **output, uint64_t *outputlength)
charstring::findLast
static const char * findLast(const char *haystack, const char *needle)
charstring::strip
static bool strip(char *str, char character)
charstring::quotedPrintableEncode
static char * quotedPrintableEncode(const unsigned char *input, uint64_t inputsize)
charstring::escape
static void escape(const char *input, uint64_t inputlength, char **output, uint64_t *outputlength, const char *characters)
charstring::parseNumber
static char * parseNumber(double number, uint16_t precision, uint16_t scale)
charstring::findFirstIgnoringCase
static char * findFirstIgnoringCase(char *haystack, char needle)
charstring::parseNumber
static char * parseNumber(int64_t number)
charstring::findFirstIgnoringCase
static const char * findFirstIgnoringCase(const char *haystack, const char *needle)
charstring::toFloatC
static long double toFloatC(const char *string)
charstring::stripSet
static bool stripSet(char *str1, const char *set)
charstring::contains
static bool contains(const char *haystack, const char *needle)
charstring::bothTrim
static void bothTrim(char *str)
charstring::base64Decode
static unsigned char * base64Decode(const char *input, uint64_t inputlength)
charstring::findFirstOrEndIgnoringCase
static const char * findFirstOrEndIgnoringCase(const char *haystack, const char *needle)
charstring::compare
static int32_t compare(const char *str1, const char *str2, size_t length)
charstring::toFloat
static long double toFloat(const char *string)
charstring::httpUnescape
static char * httpUnescape(const char *input)
charstring::escape
static char * escape(const char *input, const char *characters)
charstring::findLastOfSetOrEnd
static char * findLastOfSetOrEnd(char *haystack, const char *set)
charstring::leftJustify
static void leftJustify(char *str, int32_t len)
charstring::toFloat
static long double toFloat(const char *string, const char **endptr)
charstring::parseNumber
static char * parseNumber(long double number, uint16_t precision, uint16_t scale)
charstring::toInteger
static int64_t toInteger(const char *string)
charstring::integerLength
static uint16_t integerLength(uint16_t number)
charstring::toInteger
static int64_t toInteger(const char *string, int32_t base)
charstring::base64Decode
static unsigned char * base64Decode(const char *input)
charstring::zero
static void zero(char *str, size_t len)
charstring::pad
static char * pad(const char *string, char padchar, int16_t direction, uint64_t totallength)
charstring::base64Encode
static void base64Encode(const unsigned char *input, uint64_t inputsize, char **output, uint64_t *outputlength)
charstring::append
static char * append(char *dest, double number, uint16_t scale)
charstring::findLastIgnoringCase
static char * findLastIgnoringCase(char *haystack, char needle)
charstring::isNo
static bool isNo(const char *string)
charstring::between
static char * between(const char *str, const char *start, const char *end)
charstring::replace
static char * replace(const char *str, regularexpression *from, const char *to, bool global)
charstring::capitalize
static void capitalize(char *str)
charstring::printf
static ssize_t printf(char *buffer, size_t len, const char *format,...)
charstring::integerLength
static uint16_t integerLength(uint64_t number)
charstring::findLast
static char * findLast(char *haystack, char needle)
charstring::isNumber
static bool isNumber(const char *val, int32_t len)
charstring::printf
static ssize_t printf(char **buffer, const char *format, va_list *argp)
charstring::findFirstOrEnd
static const char * findFirstOrEnd(const char *haystack, const char *needle)
charstring::lengthNotContainingSet
static size_t lengthNotContainingSet(const char *haystack, const char *set)
charstring::inSetIgnoringCase
static bool inSetIgnoringCase(const char *str, const char *const *set)
charstring::findFirstOfSetOrEnd
static char * findFirstOfSetOrEnd(char *haystack, const char *set)
charstring::toInteger
static int64_t toInteger(const char *string, const char **endptr)
charstring::hexDecode
static unsigned char * hexDecode(const char *input, uint64_t inputlength)
charstring::size
static size_t size(const char *string)
charstring::unescape
static char * unescape(const char *input)
charstring::unescape
static void unescape(const char *input, uint64_t inputlength, char **output, uint64_t *outputlength)
charstring::quotedPrintableEncode
static char * quotedPrintableEncode(const unsigned char *input)
charstring::findFirstOrEnd
static char * findFirstOrEnd(char *haystack, const char *needle)
charstring::replace
static void replace(char *str, char oldchar, char newchar)
charstring::compare
static int32_t compare(const char *str1, const char *str2)
charstring::split
static void split(const char *string, const char *delimiter, bool collapse, char ***list, uint64_t *listlength)
charstring::parseNumber
static char * parseNumber(long double number)
charstring::findLast
static const char * findLast(const char *haystack, char needle)
charstring::parseNumber
static char * parseNumber(int16_t number, uint16_t zeropadding)
charstring::inSet
static bool inSet(const char *str, const char *const *set)
charstring::deobfuscate
static void deobfuscate(char *str)
charstring::after
static char * after(const char *str, const char *delimiter)
charstring::findFirst
static char * findFirst(char *haystack, char needle)
charstring::findFirstOrEndIgnoringCase
static char * findFirstOrEndIgnoringCase(char *haystack, const char *needle)
charstring::findFirstOfSet
static char * findFirstOfSet(char *haystack, const char *set)
charstring::findFirst
static const char * findFirst(const char *haystack, char needle)
charstring::parseNumber
static char * parseNumber(double number, uint16_t scale)
charstring::strip
static bool strip(char *str1, const char *str2)
charstring::duplicate
static char * duplicate(const char *str)
charstring::integerLength
static uint16_t integerLength(int16_t number)
charstring::base64Decode
static void base64Decode(const char *input, uint64_t inputlength, unsigned char **output, uint64_t *outputsize)
charstring::append
static char * append(char *dest, double number)
charstring::compareIgnoringCase
static int32_t compareIgnoringCase(const char *str1, const char *str2)
charstring::append
static char * append(char *dest, const char *source, size_t len)
charstring::containsIgnoringCase
static bool containsIgnoringCase(const char *haystack, char needle)
charstring::findFirstOfSet
static const char * findFirstOfSet(const char *haystack, const char *set)
charstring::parseNumber
static char * parseNumber(double number)
charstring::integerLength
static uint16_t integerLength(int32_t number)
charstring::toUnsignedInteger
static uint64_t toUnsignedInteger(const char *string, int32_t base)
charstring::obfuscate
static void obfuscate(char *str)
charstring::copy
static char * copy(char *dest, const char *source)
charstring::parseNumber
static char * parseNumber(float number, uint16_t precision, uint16_t scale)
charstring::findLast
static char * findLast(char *haystack, const char *needle)
charstring::convertAmount
static char * convertAmount(int64_t amount, uint16_t padding)
charstring::copy
static char * copy(char *dest, size_t location, const char *source, size_t len)
charstring::httpEscape
static char * httpEscape(const char *input)
charstring::integerLength
static uint16_t integerLength(uint32_t number)
charstring::before
static char * before(const char *str, const char *delimiter)
charstring::parseNumber
static char * parseNumber(uint64_t number)
charstring::quotedPrintableDecode
static unsigned char * quotedPrintableDecode(const char *input)
charstring::isInteger
static bool isInteger(const char *val, int32_t len)
charstring::hexEncode
static char * hexEncode(const unsigned char *input)
charstring::copy
static char * copy(char *dest, size_t location, const char *source)
charstring::base64Encode
static char * base64Encode(const unsigned char *input, uint64_t inputsize)
charstring::lengthContainingSet
static size_t lengthContainingSet(const char *haystack, const char *set)
charstring::parseNumber
static char * parseNumber(uint64_t number, uint16_t zeropadding)
input
Definition: input.h:9
output
Definition: output.h:9
regularexpression
Definition: regularexpression.h:14