4#ifndef RUDIMENTS_CHARSTRING_H
5#define RUDIMENTS_CHARSTRING_H
7#include <rudiments/private/charstringincludes.h>
32 static size_t getSize(
const char *
string);
48 static bool isYes(
const char *
string);
60 static bool isNo(
const char *
string);
67 static void zero(
char *str,
size_t len);
72 static char *
append(
char *dest,
const char *source);
77 static char *
append(
char *dest,
const char *source,
83 static char *
append(
char *dest, int64_t number);
88 static char *
append(
char *dest, uint64_t number);
93 static char *
append(
char *dest,
double number);
99 static char *
append(
char *dest,
double number,
106 static char *
append(
char *dest,
double number,
113 static char *
copy(
char *dest,
const char *source);
119 const char *source,
size_t len);
125 static char *
copy(
char *dest,
size_t location,
132 static char *
copy(
char *dest,
size_t location,
133 const char *source,
size_t len);
147 const char *source,
size_t sourcelen);
151 static int32_t
compare(
const char *str1,
const char *str2);
156 static int32_t
compare(
const char *str1,
const char *str2,
199 const char *delimiters);
225 const char *delimiters);
292 const char *
const *set);
299 const char *
const *set);
313 static bool contains(
const char *haystack,
char needle);
338 const char *haystack,
349 const char *haystack,
362 const char *haystack,
375 const char *haystack,
386 const char *haystack,
397 const char *haystack,
402 static char *
findFirst(
char *haystack,
const char *needle);
432 static char *
findLast(
char *haystack,
const char *needle);
441 static char *
findLast(
char *haystack,
char needle);
465 const char *haystack,
493 const char *haystack,
705 const char *delimiter);
721 const char *delimiter);
963 static bool strip(
char *str1,
const char *str2);
973 char oldchar,
char newchar);
978 const char *oldchars,
char newchar);
994 const char *
const *oldstrset,
995 const char *
const *newstrset);
1005 const char *
const *oldstrset,
1007 const char *
const *newstrset);
1012 char oldchar,
char newchar);
1017 const char *oldchars,
char newchar);
1024 const char *newstr);
1033 const char *
const *oldstrset,
1034 const char *
const *newstrset);
1044 const char *
const *oldstrset,
1046 const char *
const *newstrset);
1113 uint16_t zeropadding);
1119 uint16_t zeropadding);
1135 uint16_t zeropadding);
1141 uint16_t zeropadding);
1157 uint16_t zeropadding);
1163 uint16_t zeropadding);
1227 const char **endptr);
1237 const char **endptr, int32_t base);
1241 const char *
string);
1248 const char **endptr);
1262 const char **endptr,
1288 const char **endptr);
1324 const char *characters);
1338 uint64_t *outputlen,
1339 const char *characters);
1347 uint64_t *outputlen);
1367 uint64_t inputsize);
1375 uint64_t *outputlen);
1393 uint64_t *outputsize);
1399 const byte_t *
input);
1404 const byte_t *
input,
1405 uint64_t inputsize);
1411 const byte_t *
input,
1414 uint64_t *outputlen);
1432 uint64_t *outputlen);
1443 uint64_t inputsize);
1451 uint64_t *outputlen);
1469 uint64_t *outputsize);
1513 static char *
pad(
const char *
string,
1528 const char *delimiter,
1529 size_t delimiterlen,
1532 uint64_t *listcount);
1542 const char *delimiter,
1543 size_t delimiterlen,
1546 uint64_t *listcount);
1557 const char *delimiter,
1560 uint64_t *listcount);
1570 const char *delimiter,
1573 uint64_t *listcount);
1579 size_t start,
size_t end);
1658 static ssize_t
printf(
char *buffer,
size_t len,
1659 const char *format, ...);
1686 static ssize_t
printf(
char *buffer,
size_t len,
1707 const char *format, ...);
1729 #include <rudiments/private/charstring.h>
Definition character.h:11
Definition charstring.h:20
static char * parseNumber(long double number)
static char * getSubString(const char *str, size_t start, size_t end)
static size_t getSize(const char *string)
static bool isNumber(const char *val)
static void leftTrim(char *str, char character)
static void replace(char *str, const char *oldchars, char newchar)
static char * duplicate(const wchar_t *str, size_t len, char replacement)
static char * escape(const char *input, const char *characters)
static char * duplicate(const char *str, size_t len)
static char * parseNumber(float number)
static char * parseNumber(uint32_t number, uint16_t zeropadding)
static char * duplicate(const wchar_t *str, size_t len)
static bool endsWith(const char *haystack, const char *needle)
static char * duplicate(const char *str)
static char * quotedPrintableEncode(const byte_t *input, uint64_t inputsize)
static void split(const char *string, size_t stringlen, const char *delimiter, bool collapse, char ***list, uint64_t *listcount)
static bool containsIgnoringCase(const char *haystack, const char *needle)
static uint16_t getIntegerLength(uint32_t number)
static void upper(char *str)
static char * parseNumber(uint16_t number, uint16_t zeropadding)
static char * findEndOfQuotedString(char *string, size_t stringlen, bool backslash, bool doubling)
static bool isInSetIgnoringCase(const char *str, const char *const *set)
static size_t getLengthNotContainingSet(const char *haystack, const char *set)
static void center(char *str, int32_t len)
static long double convertToFloatC(const char *string)
static bool isYes(const char *string)
static char * duplicateUcs2(const ucs2_t *str, size_t len, char replacement)
static char * replace(const char *str, const char *oldstr, const char *newstr)
static char * parseNumber(int16_t number)
static void split(const char *string, const char *delimiter, bool collapse, char ***list, uint64_t *listcount)
static int32_t compareVersions(const char *str1, const char *str2, const char *delimiters)
static const char * findLastIgnoringCase(const char *haystack, char needle)
static char * findFirstOfSetOrEnd(char *haystack, const char *set)
static int64_t convertToInteger(const char *string)
static char * hexEncode(const byte_t *input, uint64_t inputsize)
static uint64_t convertToUnsignedInteger(const char *string, const char **endptr, int32_t base)
static char * hexEncode(const byte_t *input)
static char * duplicateUcs2(const ucs2_t *str, char replacement)
static void rightTrim(char *str)
static char * findEndOfQuotedString(char *string, char quote, bool backslash, bool doubling)
static char * isAfter(const char *str, const char *delimiter)
static void rightJustify(char *str, int32_t len)
static bool compareWithWildcards(const char *string, const char *pattern, size_t patternlen, char singlewildcard, char multiwildcard)
static bool isInSet(const char *str, const char *const *set)
static void bothTrim(char *str, char character)
static uint64_t convertToUnsignedInteger(const char *string)
static uint64_t convertToUnsignedInteger(const char *string, int32_t base)
static ssize_t printf(char **buffer, const char *format,...)
static bool startsWith(const char *haystack, const char *needle)
static char * convertAmount(int64_t amount, uint16_t padding)
static long double convertToFloat(const char *string, const char **endptr)
static char * findEndOfQuotedString(char *string, size_t stringlen, char quote, bool backslash, bool doubling)
static char * pad(const char *string, char padchar, int16_t direction, uint64_t totallen)
static int64_t convertAmount(const char *amount)
static const char * findLastIgnoringCase(const char *haystack, const char *needle)
static char * copy(char *dest, const char *source)
static char * urlDecode(const char *input)
static const char * findFirstIgnoringCase(const char *haystack, const char *needle)
static const char * findFirstOrEnd(const char *haystack, const char *needle)
static int64_t convertToInteger(const char *string, const char **endptr, int32_t base)
static uint16_t getIntegerLength(int16_t number)
static char * replaceIgnoringCase(const char *str, const char *const *oldstrset, const char *const *newstrset)
static char * replace(const char *str, regularexpression *from, const char *to, bool global)
static char * copy(char *dest, size_t location, const char *source, size_t len)
static char * duplicateUcs2(const ucs2_t *str, bool bigendian)
static char * findEndOfQuotedString(char *string, bool backslash, bool doubling)
static void leftTrim(char *str)
static char * isBetween(const char *str, const char *start, const char *end)
static const char * findFirst(const char *haystack, const char *needle)
static const char * findFirstIgnoringCase(const char *haystack, char needle)
static ssize_t printf(char *buffer, size_t len, const char *format, va_list *argp)
static void rightTrim(char *str, char character)
static const char * findFirst(const char *haystack, char needle)
static bool isNullOrEmpty(const char *string)
static char * convertAmount(int64_t amount)
static char * insertString(const char *dest, const char *src, uint64_t index)
static void lower(char *str)
static bool contains(const char *haystack, char needle)
static byte_t * quotedPrintableDecode(const char *input, uint64_t inputlen)
static void quotedPrintableEncode(const byte_t *input, uint64_t inputsize, char **output, uint64_t *outputlen)
static const char * findFirstOrEndIgnoringCase(const char *haystack, char needle)
static int32_t compareVersions(const char *str1, const char *str2)
static char * findFirstOrEnd(char *haystack, const char *needle)
static int32_t compareIgnoringCase(const char *str1, const char *str2, size_t len)
static void split(const char *string, const char *delimiter, size_t delimiterlen, bool collapse, char ***list, uint64_t *listcount)
static char * replaceIgnoringCase(const char *str, const char *oldstr, const char *newstr)
static char * findLastOfSetOrEnd(char *haystack, const char *set)
static char * parseNumber(int64_t number, uint16_t zeropadding)
static bool isInteger(const char *val)
static void unescape(const char *input, uint64_t inputlen, char **output, uint64_t *outputlen)
static void hexEncode(const byte_t *input, uint64_t inputsize, char **output, uint64_t *outputlen)
static void split(const char *string, size_t stringlen, const char *delimiter, size_t delimiterlen, bool collapse, char ***list, uint64_t *listcount)
static byte_t * hexDecode(const char *input)
static char * getHumanReadable(int64_t number, bool onethousand)
static char * findFirstOrEndIgnoringCase(char *haystack, const char *needle)
static char * duplicateUcs2(const ucs2_t *str, size_t len)
static char * replace(const char *str, const char *const *oldstrset, size_t *oldstrlen, const char *const *newstrset)
static char * parseNumber(uint16_t number)
static bool strip(char *str, char character)
static char * isBefore(const char *str, const char *delimiter)
static char * unescape(const char *input)
static char * findFirst(char *haystack, char needle)
static char * findFirstIgnoringCase(char *haystack, char needle)
static char * duplicateUcs2(const ucs2_t *str, char replacement, bool bigendian)
static long double convertToFloat(const char *string)
static bool stripSet(char *str1, const char *set)
static char * parseNumber(int64_t number)
static bool contains(const char *haystack, const char *needle)
static void bothTrim(char *str)
static byte_t * base64Decode(const char *input, uint64_t inputlen)
static size_t getLength(const char *string)
static const char * findLast(const char *haystack, char needle)
static uint16_t getIntegerLength(uint16_t number)
static byte_t * quotedPrintableDecode(const char *input)
static const char * findFirstOrEndIgnoringCase(const char *haystack, const char *needle)
static char * parseNumber(double number)
static char * append(char *dest, double number, uint16_t scale)
static char * findLast(char *haystack, char needle)
static void leftJustify(char *str, int32_t len)
static const char * findFirstOfSetOrEnd(const char *haystack, const char *set)
static char * replace(const char *str, const char *const *oldstrset, const char *const *newstrset)
static void zero(char *str, size_t len)
static const char * findEndOfQuotedString(const char *string, size_t stringlen, bool backslash, bool doubling)
static char * findFirst(char *haystack, const char *needle)
static bool isNo(const char *string)
static char * parseNumber(int32_t number, uint16_t zeropadding)
static void capitalize(char *str)
static char * parseNumber(float number, uint16_t scale)
static char * append(char *dest, uint64_t number)
static char * getHumanReadable(uint64_t number, bool onethousand)
static char * parseNumber(uint64_t number, uint16_t zeropadding)
static char * duplicate(const wchar_t *str, char replacement)
static void base64Decode(const char *input, uint64_t inputlen, byte_t **output, uint64_t *outputsize)
static ssize_t printf(char *buffer, size_t len, const char *format,...)
static char * append(char *dest, const char *source)
static int64_t convertToInteger(const char *string, int32_t base)
static char * findLastIgnoringCase(char *haystack, const char *needle)
static bool isNumber(const char *val, int32_t len)
static char * parseNumber(float number, uint16_t precision, uint16_t scale)
static bool compareWithWildcards(const char *string, const char *pattern, char singlewildcard, char multiwildcard)
static ssize_t printf(char **buffer, const char *format, va_list *argp)
static void hexDecode(const char *input, uint64_t inputlen, byte_t **output, uint64_t *outputsize)
static char * parseNumber(uint32_t number)
static char * findFirstIgnoringCase(char *haystack, const char *needle)
static char * findLast(char *haystack, const char *needle)
static char * append(char *dest, double number, uint16_t precision, uint16_t scale)
static byte_t * hexDecode(const char *input, uint64_t inputlen)
static char * urlEncode(const char *input)
static char * getHumanReadable(long double number, bool onethousand)
static char * duplicateUcs2(const ucs2_t *str, size_t len, bool bigendian)
static char * duplicateUcs2(const ucs2_t *str)
static char * base64Encode(const byte_t *input)
static void replace(char *str, char oldchar, char newchar)
static int32_t compare(const char *str1, const char *str2)
static byte_t * base64Decode(const char *input)
static char * getSubString(const char *str, size_t start)
static char * getHumanReadable(int64_t number)
static char * safeCopy(char *dest, size_t destlen, const char *source)
static char * parseNumber(int16_t number, uint16_t zeropadding)
static void deobfuscate(char *str)
static char * copy(char *dest, size_t location, const char *source)
static uint16_t getIntegerLength(int64_t number)
static char * parseNumber(double number, uint16_t precision, uint16_t scale)
static char * parseNumber(long double number, uint16_t scale)
static const char * findFirstOfSet(const char *haystack, const char *set)
static bool strip(char *str1, const char *str2)
static char * parseNumber(int32_t number)
static char * append(char *dest, const char *source, size_t len)
static int32_t compareIgnoringCase(const char *str1, const char *str2)
static char * findLastIgnoringCase(char *haystack, char needle)
static char * copy(char *dest, const char *source, size_t len)
static bool containsIgnoringCase(const char *haystack, char needle)
static char * append(char *dest, int64_t number)
static int32_t compareNatural(const char *str1, const char *str2, const char *delimiters)
static char * parseNumber(long double number, uint16_t precision, uint16_t scale)
static const char * findLast(const char *haystack, const char *needle)
static const char * findFirstOrEnd(const char *haystack, char needle)
static void obfuscate(char *str)
static char * safeCopy(char *dest, size_t destlen, const char *source, size_t sourcelen)
static const char * findEndOfQuotedString(const char *string, size_t stringlen, char quote, bool backslash, bool doubling)
static char * duplicate(const wchar_t *str)
static const char * findLastOfSetOrEnd(const char *haystack, const char *set)
static char * append(char *dest, double number)
static const char * findEndOfQuotedString(const char *string, char quote, bool backslash, bool doubling)
static uint64_t convertToUnsignedInteger(const char *string, const char **endptr)
static char * findLastOfSet(char *haystack, const char *set)
static char * parseNumber(double number, uint16_t scale)
static char * getHumanReadable(uint64_t number)
static char * parseNumber(uint64_t number)
static char * getHumanReadable(long double number)
static char * findFirstOfSet(char *haystack, const char *set)
static const char * findLastOfSet(const char *haystack, const char *set)
static int32_t compareNatural(const char *str1, const char *str2)
static int32_t compare(const char *str1, const char *str2, size_t len)
static size_t getLengthContainingSet(const char *haystack, const char *set)
static char * duplicateUcs2(const ucs2_t *str, size_t len, char replacement, bool bigendian)
static void quotedPrintableDecode(const char *input, uint64_t inputlen, byte_t **output, uint64_t *outputlen)
static void escape(const char *input, uint64_t inputlen, char **output, uint64_t *outputlen, const char *characters)
static char * quotedPrintableEncode(const byte_t *input)
static char * base64Encode(const byte_t *input, uint64_t inputsize)
static bool isInteger(const char *val, int32_t len)
static void base64Encode(const byte_t *input, uint64_t inputsize, char **output, uint64_t *outputlen)
static const char * findEndOfQuotedString(const char *string, bool backslash, bool doubling)
static bool compareWithWildcards(const char *string, size_t stringlen, const char *pattern, char singlewildcard, char multiwildcard)
static uint16_t getIntegerLength(int32_t number)
static int64_t convertToInteger(const char *string, const char **endptr)
static uint16_t getIntegerLength(uint64_t number)
static bool compareWithWildcards(const char *string, size_t stringlen, const char *pattern, size_t patternlen, char singlewildcard, char multiwildcard)
static void replaceIgnoringCase(char *str, const char *oldchars, char newchar)
static void replaceIgnoringCase(char *str, char oldchar, char newchar)
static char * replaceIgnoringCase(const char *str, const char *const *oldstrset, size_t *oldstrlen, const char *const *newstrset)
Definition regularexpression.h:14