4 #ifndef RUDIMENTS_WCHARSTRING_H
5 #define RUDIMENTS_WCHARSTRING_H
7 #include <rudiments/private/wcharstringincludes.h>
21 static size_t length(
const wchar_t *
string);
25 static size_t size(
const wchar_t *
string);
37 static bool isYes(
const wchar_t *
string);
45 static bool isNo(
const wchar_t *
string);
48 static void zero(
wchar_t *str,
size_t len);
53 static wchar_t *
append(
wchar_t *dest,
const wchar_t *source);
58 static wchar_t *
append(
wchar_t *dest,
const wchar_t *source,
64 static wchar_t *
append(
wchar_t *dest, int64_t number);
69 static wchar_t *
append(
wchar_t *dest, uint64_t number);
74 static wchar_t *
append(
wchar_t *dest,
double number);
80 static wchar_t *
append(
wchar_t *dest,
double number,
87 static wchar_t *
append(
wchar_t *dest,
double number,
94 static wchar_t *
copy(
wchar_t *dest,
const wchar_t *source);
99 static wchar_t *
copy(
wchar_t *dest,
100 const wchar_t *source,
size_t size);
106 static wchar_t *
copy(
wchar_t *dest,
size_t location,
107 const wchar_t *source);
113 static wchar_t *
copy(
wchar_t *dest,
size_t location,
114 const wchar_t *source,
size_t size);
120 static wchar_t *
safeCopy(
wchar_t *dest,
size_t destlen,
121 const wchar_t *source);
129 const wchar_t *source,
135 const wchar_t *str2);
146 const wchar_t *str2);
159 static bool inSet(
const wchar_t *str,
160 const wchar_t *
const *set);
167 const wchar_t *
const *set);
172 const wchar_t *needle);
177 const wchar_t *needle);
192 const wchar_t *needle);
197 const wchar_t *needle);
201 static const wchar_t *
findFirst(
const wchar_t *haystack,
202 const wchar_t *needle);
207 const wchar_t *haystack,
208 const wchar_t *needle);
212 static const wchar_t *
findFirst(
const wchar_t *haystack,
218 const wchar_t *haystack,
225 const wchar_t *needle);
231 const wchar_t *haystack,
232 const wchar_t *needle);
244 const wchar_t *haystack,
249 static const wchar_t *
findLast(
const wchar_t *haystack,
250 const wchar_t *needle);
254 static const wchar_t *
findLast(
const wchar_t *haystack,
260 const wchar_t *needle);
265 const wchar_t *needle);
269 static wchar_t *
findFirst(
wchar_t *haystack,
wchar_t needle);
280 const wchar_t *needle);
286 const wchar_t *needle);
291 const wchar_t *needle);
296 const wchar_t *haystack,
297 const wchar_t *needle);
301 static wchar_t *
findLast(
wchar_t *haystack,
wchar_t needle);
306 const wchar_t *haystack,
326 const wchar_t *haystack,
354 const wchar_t *haystack,
369 static wchar_t *
before(
const wchar_t *str,
370 const wchar_t *delimiter);
377 const wchar_t *start,
385 static wchar_t *
after(
const wchar_t *str,
386 const wchar_t *delimiter);
425 static wchar_t *
duplicate(
const wchar_t *str,
size_t len);
465 static bool strip(
wchar_t *str1,
const wchar_t *str2);
470 static bool stripSet(
wchar_t *str1,
const wchar_t *set);
481 const wchar_t *oldchars,
488 const wchar_t *oldstr,
489 const wchar_t *newstr);
499 const wchar_t *
const *oldstrset,
501 const wchar_t *
const *newstrset);
533 static bool isInteger(
const wchar_t *val, int32_t size);
541 static bool isNumber(
const wchar_t *val, int32_t size);
557 uint16_t zeropadding);
563 uint16_t zeropadding);
579 uint16_t zeropadding);
585 uint16_t zeropadding);
601 uint16_t zeropadding);
607 uint16_t zeropadding);
671 const wchar_t **endptr);
674 static int64_t
toInteger(
const wchar_t *
string, int32_t base);
680 const wchar_t **endptr,
685 const wchar_t *
string);
691 const wchar_t **endptr);
703 const wchar_t **endptr,
708 static long double toFloat(
const wchar_t *
string);
720 static long double toFloatC(
const wchar_t *
string);
725 static long double toFloat(
const wchar_t *
string,
726 const wchar_t **endptr);
750 const wchar_t *characters);
762 wchar_t **
output, uint64_t *outputsize,
763 const wchar_t *characters);
771 uint64_t *outputsize);
788 static void center(
wchar_t *str, int32_t len);
796 static wchar_t *
pad(
const wchar_t *
string,
799 uint64_t totallength);
809 static void split(
const wchar_t *
string,
810 ssize_t stringlength,
811 const wchar_t *delimiter,
812 ssize_t delimiterlength,
815 uint64_t *listlength);
824 static void split(
const wchar_t *
string,
825 const wchar_t *delimiter,
826 ssize_t delimiterlength,
829 uint64_t *listlength);
838 static void split(
const wchar_t *
string,
839 ssize_t stringlength,
840 const wchar_t *delimiter,
843 uint64_t *listlength);
852 static void split(
const wchar_t *
string,
853 const wchar_t *delimiter,
856 uint64_t *listlength);
862 size_t start,
size_t end);
867 static wchar_t *
subString(
const wchar_t *str,
size_t start);
892 static ssize_t
printf(
wchar_t *buffer,
size_t len,
893 const wchar_t *format, ...);
915 static ssize_t
printf(
wchar_t *buffer,
size_t len,
916 const wchar_t *format,
931 const wchar_t *format, ...);
945 const wchar_t *format,
948 #include <rudiments/private/wcharstring.h>
Definition: character.h:11
Definition: wcharstring.h:17
static wchar_t * parseNumber(int32_t number, uint16_t zeropadding)
static wchar_t * parseNumber(int64_t number, uint16_t zeropadding)
static void lower(wchar_t *str)
static wchar_t * parseNumber(double number, uint16_t precision, uint16_t scale)
static wchar_t * duplicate(const wchar_t *str, size_t len)
static wchar_t * convertAmount(int64_t amount, uint16_t padding)
static wchar_t * replace(const wchar_t *str, const wchar_t *oldstr, const wchar_t *newstr)
static int32_t compareIgnoringCase(const wchar_t *str1, const wchar_t *str2, size_t size)
static void center(wchar_t *str, int32_t len)
static bool isYes(const wchar_t *string)
static uint64_t toUnsignedInteger(const wchar_t *string, const wchar_t **endptr)
static wchar_t * parseNumber(long double number)
static void rightJustify(wchar_t *str, int32_t len)
static int32_t compare(const wchar_t *str1, const wchar_t *str2, size_t size)
static wchar_t * unescape(const wchar_t *input)
static const wchar_t * findFirst(const wchar_t *haystack, const wchar_t *needle)
static wchar_t * parseNumber(long double number, uint16_t precision, uint16_t scale)
static const wchar_t * findFirstIgnoringCase(const wchar_t *haystack, const wchar_t *needle)
static void split(const wchar_t *string, const wchar_t *delimiter, bool collapse, wchar_t ***list, uint64_t *listlength)
static wchar_t * parseNumber(int32_t number)
static const wchar_t * findFirstOfSetOrEnd(const wchar_t *haystack, const wchar_t *set)
static const wchar_t * findFirstOrEnd(const wchar_t *haystack, const wchar_t *needle)
static uint16_t integerLength(uint32_t number)
static wchar_t * findFirstIgnoringCase(wchar_t *haystack, wchar_t needle)
static const wchar_t * findFirst(const wchar_t *haystack, wchar_t needle)
static bool strip(wchar_t *str, wchar_t character)
static void leftTrim(wchar_t *str)
static uint16_t integerLength(int32_t number)
static size_t length(const wchar_t *string)
static const wchar_t * findLast(const wchar_t *haystack, wchar_t needle)
static wchar_t * parseNumber(float number)
static wchar_t * before(const wchar_t *str, const wchar_t *delimiter)
static wchar_t * append(wchar_t *dest, int64_t number)
static wchar_t * parseNumber(double number, uint16_t scale)
static wchar_t * append(wchar_t *dest, double number, uint16_t precision, uint16_t scale)
static bool startsWith(const wchar_t *haystack, const wchar_t *needle)
static int32_t compare(const wchar_t *str1, const wchar_t *str2)
static wchar_t * parseNumber(uint16_t number, uint16_t zeropadding)
static wchar_t * findFirst(wchar_t *haystack, wchar_t needle)
static void bothTrim(wchar_t *str, wchar_t character)
static wchar_t * append(wchar_t *dest, const wchar_t *source, size_t size)
static void rightTrim(wchar_t *str)
static const wchar_t * findFirstOrEnd(const wchar_t *haystack, wchar_t needle)
static const wchar_t * findFirstIgnoringCase(const wchar_t *haystack, wchar_t needle)
static wchar_t * subString(const wchar_t *str, size_t start, size_t end)
static wchar_t * after(const wchar_t *str, const wchar_t *delimiter)
static ssize_t printf(wchar_t *buffer, size_t len, const wchar_t *format, va_list *argp)
static ssize_t printf(wchar_t *buffer, size_t len, const wchar_t *format,...)
static bool isNumber(const wchar_t *val)
static void escape(const wchar_t *input, uint64_t inputsize, wchar_t **output, uint64_t *outputsize, const wchar_t *characters)
static const wchar_t * findLast(const wchar_t *haystack, const wchar_t *needle)
static wchar_t * safeCopy(wchar_t *dest, size_t destlen, const wchar_t *source, size_t sourcesize)
static const wchar_t * findLastOfSetOrEnd(const wchar_t *haystack, const wchar_t *set)
static void rightTrim(wchar_t *str, wchar_t character)
static wchar_t * copy(wchar_t *dest, size_t location, const wchar_t *source, size_t size)
static wchar_t * convertAmount(int64_t amount)
static bool isInteger(const wchar_t *val, int32_t size)
static wchar_t * parseNumber(float number, uint16_t scale)
static int64_t convertAmount(const wchar_t *amount)
static void replace(wchar_t *str, const wchar_t *oldchars, wchar_t newchar)
static const wchar_t * findLastOfSet(const wchar_t *haystack, const wchar_t *set)
static wchar_t * pad(const wchar_t *string, wchar_t padchar, int16_t direction, uint64_t totallength)
static wchar_t * escape(const wchar_t *input, const wchar_t *characters)
static uint16_t integerLength(uint16_t number)
static wchar_t * replace(const wchar_t *str, const wchar_t *const *oldstrset, ssize_t *oldstrlen, const wchar_t *const *newstrset)
static wchar_t * append(wchar_t *dest, double number)
static bool contains(const wchar_t *haystack, const wchar_t *needle)
static long double toFloat(const wchar_t *string)
static wchar_t * findFirstOrEndIgnoringCase(wchar_t *haystack, const wchar_t *needle)
static long double toFloatC(const wchar_t *string)
static void split(const wchar_t *string, ssize_t stringlength, const wchar_t *delimiter, bool collapse, wchar_t ***list, uint64_t *listlength)
static wchar_t * parseNumber(int16_t number, uint16_t zeropadding)
static uint16_t integerLength(int64_t number)
static wchar_t * findFirstOfSet(wchar_t *haystack, const wchar_t *set)
static wchar_t * findFirstOrEnd(wchar_t *haystack, const wchar_t *needle)
static bool inSetIgnoringCase(const wchar_t *str, const wchar_t *const *set)
static wchar_t * findLastOfSet(wchar_t *haystack, const wchar_t *set)
static void replace(wchar_t *str, wchar_t oldchar, wchar_t newchar)
static long double toFloat(const wchar_t *string, const wchar_t **endptr)
static int64_t toInteger(const wchar_t *string, const wchar_t **endptr)
static wchar_t * parseNumber(float number, uint16_t precision, uint16_t scale)
static wchar_t * duplicate(const char *str, size_t len)
static wchar_t * subString(const wchar_t *str, size_t start)
static wchar_t * append(wchar_t *dest, const wchar_t *source)
static wchar_t * duplicate(const wchar_t *str)
static wchar_t * parseNumber(int64_t number)
static bool contains(const wchar_t *haystack, wchar_t needle)
static wchar_t * append(wchar_t *dest, double number, uint16_t scale)
static size_t size(const wchar_t *string)
static const wchar_t * findLastIgnoringCase(const wchar_t *haystack, const wchar_t *needle)
static wchar_t * parseNumber(uint32_t number)
static bool containsIgnoringCase(const wchar_t *haystack, wchar_t needle)
static wchar_t * findFirstOfSetOrEnd(wchar_t *haystack, const wchar_t *set)
static wchar_t * parseNumber(uint16_t number)
static wchar_t * findFirstIgnoringCase(wchar_t *haystack, const wchar_t *needle)
static wchar_t * parseNumber(uint64_t number, uint16_t zeropadding)
static uint64_t toUnsignedInteger(const wchar_t *string, const wchar_t **endptr, int32_t base)
static wchar_t * findLast(wchar_t *haystack, const wchar_t *needle)
static uint16_t integerLength(int16_t number)
static wchar_t * insertString(const wchar_t *dest, const wchar_t *src, uint64_t index)
static bool inSet(const wchar_t *str, const wchar_t *const *set)
static bool isNo(const wchar_t *string)
static bool isNullOrEmpty(const wchar_t *string)
static size_t lengthContainingSet(const wchar_t *haystack, const wchar_t *set)
static wchar_t * safeCopy(wchar_t *dest, size_t destlen, const wchar_t *source)
static void split(const wchar_t *string, const wchar_t *delimiter, ssize_t delimiterlength, bool collapse, wchar_t ***list, uint64_t *listlength)
static uint64_t toUnsignedInteger(const wchar_t *string)
static wchar_t * append(wchar_t *dest, uint64_t number)
static int32_t compareIgnoringCase(const wchar_t *str1, const wchar_t *str2)
static size_t lengthNotContainingSet(const wchar_t *haystack, const wchar_t *set)
static void leftJustify(wchar_t *str, int32_t len)
static void split(const wchar_t *string, ssize_t stringlength, const wchar_t *delimiter, ssize_t delimiterlength, bool collapse, wchar_t ***list, uint64_t *listlength)
static wchar_t * findLast(wchar_t *haystack, wchar_t needle)
static wchar_t * findFirst(wchar_t *haystack, const wchar_t *needle)
static void capitalize(wchar_t *str)
static bool isInteger(const wchar_t *val)
static bool endsWith(const wchar_t *haystack, const wchar_t *needle)
static bool isNumber(const wchar_t *val, int32_t size)
static int64_t toInteger(const wchar_t *string, const wchar_t **endptr, int32_t base)
static wchar_t * parseNumber(uint32_t number, uint16_t zeropadding)
static wchar_t * between(const wchar_t *str, const wchar_t *start, const wchar_t *end)
static void bothTrim(wchar_t *str)
static bool stripSet(wchar_t *str1, const wchar_t *set)
static uint16_t integerLength(uint64_t number)
static int64_t toInteger(const wchar_t *string)
static wchar_t * copy(wchar_t *dest, const wchar_t *source, size_t size)
static wchar_t * parseNumber(int16_t number)
static wchar_t * findLastOfSetOrEnd(wchar_t *haystack, const wchar_t *set)
static void upper(wchar_t *str)
static wchar_t * copy(wchar_t *dest, size_t location, const wchar_t *source)
static void unescape(const wchar_t *input, uint64_t inputsize, wchar_t **output, uint64_t *outputsize)
static wchar_t * parseNumber(long double number, uint16_t scale)
static ssize_t printf(wchar_t **buffer, const wchar_t *format,...)
static wchar_t * parseNumber(uint64_t number)
static ssize_t printf(wchar_t **buffer, const wchar_t *format, va_list *argp)
static wchar_t * copy(wchar_t *dest, const wchar_t *source)
static void leftTrim(wchar_t *str, wchar_t character)
static const wchar_t * findFirstOrEndIgnoringCase(const wchar_t *haystack, const wchar_t *needle)
static bool strip(wchar_t *str1, const wchar_t *str2)
static int64_t toInteger(const wchar_t *string, int32_t base)
static const wchar_t * findFirstOfSet(const wchar_t *haystack, const wchar_t *set)
static wchar_t * duplicate(const char *str)
static uint64_t toUnsignedInteger(const wchar_t *string, int32_t base)
static const wchar_t * findFirstOrEndIgnoringCase(const wchar_t *haystack, wchar_t needle)
static wchar_t * parseNumber(double number)
static const wchar_t * findLastIgnoringCase(const wchar_t *haystack, wchar_t needle)
static bool containsIgnoringCase(const wchar_t *haystack, const wchar_t *needle)
static void zero(wchar_t *str, size_t len)