|
libsheepy
|
This file has basic file, random, string, list functions. More...
#include "libsheepy.h"#include "printf.h"#include <sys/stat.h>#include <ctype.h>#include <sys/time.h>#include <stdio.h>#include <ucontext.h>#include <libgen.h>#include <dirent.h>#include <stdarg.h>#include <errno.h>#include <wordexp.h>#include <stdbool.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <stdint.h>#include <signal.h>#include "sys/resource.h"#include "alloca.h"#include "pwd.h"#include "limits.h"#include "execinfo.h"#include "termios.h"#include "locale.h"
Go to the source code of this file.
Data Structures | |
| struct | decomposition |
Macros | |
| #define | internal static |
| #define | replaceS_max(s, olds, news) replaceS(s,olds,news, 0) |
| #define | iReplaceS_max(s, olds, news) iReplaceS(s,olds,news, 0) |
| #define | bReplaceS_max(s, olds, news) bReplaceS(s,olds,news, 0) |
| #define | icReplaceS_max(s, olds, news) icReplaceS(s,olds,news, 0) |
| #define | iicReplaceS_max(s, olds, news) iicReplaceS(s,olds,news, 0) |
| #define | bicReplaceS_max(s, olds, news) bicReplaceS(s,olds,news, 0) |
| #define | icReplaceUTF8_max(s, olds, news) icReplaceUTF8(s,olds,news, 0) |
| #define | iicReplaceUTF8_max(s, olds, news) iicReplaceUTF8(s,olds,news, 0) |
| #define | bicReplaceUTF8_max(s, olds, news) bicReplaceUTF8(s,olds,news, 0) |
| #define | MALLOC malloc |
| #define | REALLOC realloc |
| #define | __libsheepy 1 |
| #define | MAX_MSG_LEN 10240 |
| print logging levels logs messages to all log file More... | |
| #define | TERMRGB "\x1b[38;2;" |
| printf RGB Colors More... | |
| #define | BGTERMRGB "\x1b[48;2;" |
| #define | startMax 20 |
| #define | runeMax 0x10FFFF |
| maximum rune value More... | |
| #define | UTFSEQ(x) |
| code point length, 0 when invalid code point, x is first byte in code point More... | |
| #define | BADRUNE(x) |
| #define | UNICODE_LAST_CHAR_PART1 0x2FAFF |
| #define | UNICODE_LAST_PAGE_PART1 762 |
| #define | UNICODE_MAX_TABLE_INDEX 10000 |
| #define | UNICODE_NOT_PRESENT_OFFSET 65535 |
| #define | ATTR_TABLE(Page) |
| #define | ATTTABLE(Page, Char) ((ATTR_TABLE(Page) == UNICODE_MAX_TABLE_INDEX) ? 0 : (attr_data[ATTR_TABLE(Page)][Char])) |
| #define | TTYPE_PART1(Page, Char) |
| #define | TTYPE_PART2(Page, Char) |
| #define | RUNETYPE(rn) |
| #define | IS(Type, Class) (((uint32_t)1 << (Type)) & (Class)) |
| #define | OR(Type, Rest) (((uint32_t)1 << (Type)) | (Rest)) |
| #define | ISMARK(Type) |
| #define | ISALPHA(Type) |
| #define | RUNE_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */ |
| #define | CC_PART1(Page, Char) |
| #define | CC_PART2(Page, Char) |
| #define | COMBINING_CLASS(Char) |
| #define | SBase 0xAC00 |
| #define | LBase 0x1100 |
| #define | VBase 0x1161 |
| #define | TBase 0x11A7 |
| #define | LCount 19 |
| #define | VCount 21 |
| #define | TCount 28 |
| #define | NCount (VCount * TCount) |
| #define | SCount (LCount * NCount) |
Typedefs | |
| typedef uint64_t(* | randomWordFt) (void) |
Enumerations | |
| enum | localeType { LOCALE_NORMAL, LOCALE_TURKIC, LOCALE_LITHUANIAN } |
| enum | unicodeType { UNICODE_CONTROL, UNICODE_FORMAT, UNICODE_UNASSIGNED, UNICODE_PRIVATE_USE, UNICODE_SURROGATE, UNICODE_LOWERCASE_LETTER, UNICODE_MODIFIER_LETTER, UNICODE_OTHER_LETTER, UNICODE_TITLECASE_LETTER, UNICODE_UPPERCASE_LETTER, UNICODE_SPACING_MARK, UNICODE_ENCLOSING_MARK, UNICODE_NON_SPACING_MARK, UNICODE_DECIMAL_NUMBER, UNICODE_LETTER_NUMBER, UNICODE_OTHER_NUMBER, UNICODE_CONNECT_PUNCTUATION, UNICODE_DASH_PUNCTUATION, UNICODE_CLOSE_PUNCTUATION, UNICODE_FINAL_PUNCTUATION, UNICODE_INITIAL_PUNCTUATION, UNICODE_OTHER_PUNCTUATION, UNICODE_OPEN_PUNCTUATION, UNICODE_CURRENCY_SYMBOL, UNICODE_MODIFIER_SYMBOL, UNICODE_MATH_SYMBOL, UNICODE_OTHER_SYMBOL, UNICODE_LINE_SEPARATOR, UNICODE_PARAGRAPH_SEPARATOR, UNICODE_SPACE_SEPARATOR } |
| Unicode types: UNICODE_CONTROL: General category "Other, Control" (Cc) UNICODE_FORMAT: General category "Other, Format" (Cf) UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn) UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co) UNICODE_SURROGATE: General category "Other, Surrogate" (Cs) UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll) UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm) UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo) UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt) UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu) UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc) UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me) UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn) UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd) UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl) UNICODE_OTHER_NUMBER: General category "Number, Other" (No) UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc) UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd) UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe) UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf) UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi) UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po) UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps) UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc) UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk) UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm) UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So) UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl) UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp) UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs) More... | |
Functions | |
| internal void | segfault_sigaction (int signal, siginfo_t *si, void *arg) |
| segmentation fault handler More... | |
| internal void | segfault_sigaction (int signal UNUSED, siginfo_t *si UNUSED, void *arg UNUSED) |
| void | cleanUpCharFree (char **val) |
| void | cleanUpListFree (char ***val) |
| void | cleanUpFileFree (FILE **val) |
| void | cleanUpFd (int *val) |
| uint64_t | shStopwatch (uint8_t op) |
| nanosecond stopwatch More... | |
| int | getLogSymbols (void) |
| get current log symbols More... | |
| void | setLogSymbols (int mode) |
| set log symbols More... | |
| int | getMaxLogLevel (void) |
| get current max log level More... | |
| void | setMaxLogLevel (int logLevel) |
| set max log level logs above logMaxLevel are skipped More... | |
| FILE * | setLogFile (char *filename) |
| set log file the logs are appended to all log files set with this function More... | |
| void | closeLogFiles (void) |
| close logfiles opened with setLogFile More... | |
| int | getLogMode (void) |
| get current log mode (verbose, concise) More... | |
| void | setLogMode (int mode) |
| set log mode LOG_VERBOSE, LOG_CONCISE, . More... | |
| bool | getLogShortPath (void) |
| get current log long/short path value More... | |
| void | setLogShortPath (bool shortPath) |
| set log long/short file path value for VERBOSE mode More... | |
| bool | getLogStdout (void) |
| get stdout state, when TRUE (default) all logs are printed to stdout More... | |
| void | setLogStdout (bool state) |
| enable/disable printing logs to stdout More... | |
| bool | openProgLogFile (void) |
| log to a file named progName.log Use closeLogFiles when finished logging More... | |
| void | keepAnsiColorsInLog (bool state) |
| enable/disable ansi color codes in logs More... | |
| void | _pLog (int loglevel, const char *file, const char *func, int line, const char *msg,...) |
| int | print_k (FILE *stream, const struct printf_info *info, const void *const *args) |
| k printf type specifier, RGB foreground, uint32_t 0x00RRGGBB More... | |
| int | print_K (FILE *stream, const struct printf_info *info, const void *const *args) |
| K printf type specifier, RGB background, uint32_t 0x00RRGGBB More... | |
| int | print_k_arginfo (const struct printf_info *info UNUSED, size_t n, int *argtypes, int *size) |
| procress printf argument More... | |
| int | print_b (FILE *stream, const struct printf_info *info, const void *const *args) |
| b printf type specifier, print bool as FALSE/TRUE More... | |
| int | print_b_arginfo (const struct printf_info *info UNUSED, size_t n, int *argtypes, int *size) |
| procress printf argument More... | |
| void | finalizeLibsheepyCharAtExit (void) |
| finalize libsheepy char at exit More... | |
| int64_t | getStackLimit (void) |
| get current stack limit More... | |
| int | setStackLimit (int64_t stackSize) |
| set stack limit More... | |
| int | enableCoreDump (void) |
| enable core dump More... | |
| const char * | getProgName (void) |
| get program name More... | |
| bool | setProgName (const char *name) |
| set program name More... | |
| void | setDefaultProgName (void) |
| set default program name More... | |
| void | freeProgName (void) |
| free ProgName if set with setProgName More... | |
| const char * | getProgPath (void) |
| get program path When initLibsheepy is called before this function, it returns the given program path. More... | |
| const char * | getRealProgPath (void) |
| get real program path The first call allocates libSheepyRealProgPath, it is freed with freeRealProgPath More... | |
| void | freeRealProgPath (void) |
| free real program path finalizeLibsheepy calls this function More... | |
| int | systemNFreeF (char *command, int line, const char *thisFunc, const char *thisFileName) |
| run system command and free command buffer a message is printed when an error occurs More... | |
| time_t | getModificationTime (const char *path) |
| get modification time for path More... | |
| int | setModificationTime (const char *path, time_t mtime) |
| set modification time for path More... | |
| bool | isReadable (const char *path) |
| is path readable More... | |
| bool | isWritable (const char *path) |
| is path writable More... | |
| bool | isExecutable (const char *path) |
| is path executable More... | |
| bool | equalModificationTimes (const char *path1, const char *path2) |
| compare modification times for path1 and path2 More... | |
| time_t | getCurrentUnixTime (void) |
| get current unix time in seconds More... | |
| time_t | strToUnixTime (const char *date, const char *format) |
| convert date string to unix time More... | |
| char * | timeToS (const time_t t) |
| time To String convert unix time to string (ctime is not used here because it adds at the end of the string) More... | |
| char * | bTimeToS (char *dst, const time_t t) |
| char * | bLTimeToS (char *dst, size_t dstSize, const time_t t) |
| char * | timeToYMDS (const time_t t) |
| time To Year-Month-Day Hour:Minute:Second String convert unix time to string More... | |
| char * | bTimeToYMDS (char *dst, const time_t t) |
| char * | bLTimeToYMDS (char *dst, size_t dstSize, const time_t t) |
| char * | getCurrentDate (void) |
| get current date in ctime format (Wed Dec 12 11:44:08 2018) More... | |
| char * | bGetCurrentDate (char *dst) |
| char * | bLGetCurrentDate (char *dst, size_t dstSize) |
| char * | getCurrentDateYMD (void) |
| get current date in Y-m-d H:M:S format More... | |
| char * | bGetCurrentDateYMD (char *dst) |
| char * | bLGetCurrentDateYMD (char *dst, size_t dstSize) |
| char * | shDirname (const char *path) |
| sheepy dirname More... | |
| char * | bDirname (char *path) |
| buffer dirname More... | |
| char * | bLDirname (char *path, size_t pathSize) |
| buffer size dirname More... | |
| char * | expandHome (const char *path) |
| expands ~/ ($HOME) or ~USER duplicate and expand path. More... | |
| char * | iExpandHome (char **path) |
| expands ~/ ($HOME) or ~USER More... | |
| char * | bExpandHome (char *path) |
| buffer expands ~/ ($HOME) or ~USER More... | |
| char * | bLExpandHome (char *path, size_t pathSize) |
| buffer size expands ~/ ($HOME) or ~USER More... | |
| char * | normalizePath (const char *path) |
| normalize path More... | |
| char * | iNormalizePath (char **path) |
| normalize path More... | |
| char * | bNormalizePath (char *path) |
| buffer normalize path More... | |
| char * | bLNormalizePath (char *path, size_t pathSize) |
| buffer size normalize path More... | |
| char * | relPath (const char *path, const char *start) |
| relative path More... | |
| char * | iRelPath (char **path, const char *start) |
| relative path More... | |
| char * | bRelPath (char *dest, const char *path, const char *start) |
| relative path More... | |
| char * | bLRelPath (char *dest, size_t destSize, char *path, const char *start) |
| relative path More... | |
| char * | getHomePath (void) |
| get home path More... | |
| char * | bGetHomePath (char *path) |
| copy home path to path More... | |
| char * | bLGetHomePath (char *path, size_t pathSize) |
| copy home path to path maximum pathSize More... | |
| const char * | getCHomePath (void) |
| get home path as a const char* More... | |
| char * | getCwd (void) |
| get current working directory More... | |
| char * | bLGetCwd (char *path, size_t pathSize) |
| int | chDir (const char *path) |
| change directory More... | |
| bool | isDir (const char *path) |
| is directory More... | |
| char * | shReadlink (const char *path) |
| sheepy read link More... | |
| char * | endlink (const char *path) |
| end link More... | |
| bool | isLink (const char *path) |
| is symbolic link More... | |
| bool | fileExists (const char *filePath) |
| detect files and directories More... | |
| bool | fileChmod (const char *filePath, mode_t mode) |
| like chmod in stdlibc but return true/false More... | |
| ssize_t | fileSize (const char *filePath) |
| get file size More... | |
| ssize_t | fileSizeFP (FILE *fp) |
| get file size from file pointer More... | |
| void * | readFileToS (const char *filePath) |
| read file to string More... | |
| void * | readStreamToS (FILE *fp) |
| read file to string More... | |
| void * | bReadFileToS (const char *filePath, void *dst) |
| buffer read file to string More... | |
| void * | bReadStreamToS (FILE *fp, void *dst) |
| buffer read file to string More... | |
| void * | bLReadFileToS (const char *filePath, void *dst, size_t dstSize) |
| buffer size read file to string More... | |
| void * | bLReadStreamToS (FILE *fp, void *dst, size_t dstSize) |
| buffer size read file to string More... | |
| ssize_t | readFile (const char *filePath, void **buffer) |
| read file to buffer More... | |
| ssize_t | bReadFile (const char *filePath, void *buffer) |
| buffer read file to buffer More... | |
| ssize_t | bLReadFile (const char *filePath, void *buffer, size_t dstSize) |
| buffer size read file to buffer More... | |
| int | writeFileS (const char *filePath, const char *string) |
| write string to file More... | |
| int | writeFile (const char *filePath, void *buffer, size_t len) |
| write buffer to file More... | |
| int | writeStreamS (FILE *fp, const char *string) |
| write string to file More... | |
| int | writeLStream (FILE *fp, void *buffer, size_t len) |
| write buffer to file More... | |
| bool | appendFileS (const char *filePath, const char *string) |
| append string to filePath More... | |
| bool | appendFile (const char *filePath, void *buffer, size_t len) |
| append buffer to file More... | |
| char ** | walkDir (const char *dirPath) |
| list all files in a directory recursively and sort the list More... | |
| internal void | walkADir (const char *dirPath, char ***list) |
| char ** | walkDirDir (const char *dirPath) |
| list all directories in a directory recursively and sort the list More... | |
| internal void | walkADirDir (const char *dirPath, char ***list) |
| char ** | readDir (const char *dirPath) |
| list files in a directory and sort the list More... | |
| char ** | readDirDir (const char *dirPath) |
| list directories in a directory and sort the list More... | |
| char ** | walkDirAll (const char *dirPath) |
| list all files and directories in a directory recursively and sort the list More... | |
| internal void | walkADirAll (const char *dirPath, char ***list) |
| char ** | readDirAll (const char *dirPath) |
| list files in a directory and sort the list More... | |
| mode_t | getUmask (void) |
| get umask More... | |
| mode_t | getCurrentPermissions (void) |
| get current permissions for creating directories More... | |
| int | mkdirParents (const char *path) |
| recursive mkdir More... | |
| int | rmAll (const char *path) |
| remove all delete recursively files and directories More... | |
| int | rmADir (const char *dirPath) |
| int | copy (const char *src, const char *dst) |
| copy files recursively This function is equivalent to 'cp -Ra' without wildcards and circular link detection More... | |
| int | copyFile (const char *src, const char *dst) |
| int | copyADir (const char *src, const char *dst, const char *path) |
| int | shRename (const char *src, const char *dst) |
| rename file More... | |
| int | shMove (const char *src, const char *dst) |
| move files recursively More... | |
| void | setSoftwareRandom (void) |
| use software random numbers works on all cpu architectures the default random function is software More... | |
| void | setHardwareRandom (void) |
| use cpu hardware random number generator More... | |
| int | randomUrandomOpen (void) |
| open /dev/urandom in libsheepy More... | |
| void | randomUrandomClose (void) |
| close /dev/urandom in libsheepy call this function when random are not needed anymore More... | |
| uint64_t | randomWord (void) |
| return random 64 bit unsigned integer call randomUrandomOpen before this calling function More... | |
| uint64_t | randomWordFromHW (void) |
| return random 64 bit unsigned integer from the cpu when the cpu doesn't have the random generator instruction, the program stops with 'Illegal instruction' More... | |
| uint64_t | randomChoice (uint64_t range) |
| return a random value between 0 and range 0<=value<range call randomUrandomOpen before this calling function More... | |
| char * | randomS (uint64_t length) |
| random string More... | |
| char * | bRandomS (char *dst, size_t dstSize) |
| buffer random string More... | |
| char * | randomAlphaNumS (uint64_t length) |
| random alpha numerical string More... | |
| char * | bRandomAlphaNumS (char *dst, size_t dstSize) |
| buffer random alpha numerical string More... | |
| char * | readS (void) |
| read String read user input (one line) as a string More... | |
| char * | bLReadS (char *dst, size_t dstSize) |
| buffer read String read user input (one line) as a string More... | |
| UNUSED local char * | shGetpass (void) |
| sheepy get pass More... | |
| char * | readPasswordS (void) |
| read hidden password string More... | |
| bool | zeroS (char *string) |
| write zero to all bytes in string with memset, for clearing password buffers More... | |
| bool | zeroBuf (void *buf, size_t len) |
| write zero to all bytes in buffer with memset More... | |
| void * | memdup (const void *buf, size_t size) |
| memory duplicate allocate and copy buffer More... | |
| void | readEnter (void) |
| read Enter key wait until press the enter key More... | |
| char * | readLine (FILE *fp) |
| readLine from file stream the fist new line is converted to 0 More... | |
| void | freeManySF (char *paramType,...) |
| free Many String More... | |
| char * | dupS (const char *string) |
| duplicate string More... | |
| void | shPrintfS (const char *fmt,...) |
| sheepy Print String More... | |
| void | shEPrintfS (const char *fmt,...) |
| sheepy Error printf String print with logE More... | |
| void | logNFree (char *s) |
| log and free More... | |
| void | loghex (const void *buf, size_t len) |
| print buffer as hexadecimal string More... | |
| char * | toHexS (const void *buf, size_t len) |
| create a string with bytes in buf converted to hex strings More... | |
| char * | toHexSepS (const void *buf, size_t len, const char *separator) |
| create a string with bytes in buf converted to hex strings separated by separator More... | |
| char * | toHexHeadSepS (const void *buf, size_t len, const char *head, const char *separator) |
| create a string with bytes in buf converted to hex strings separated by separator and with head string in front of earch byte: HEADffSEP More... | |
| char * | strCpy (char *restrict dst, const char *restrict src) |
| strCpy - copy src to dst More... | |
| char * | strNCpy (char *restrict dst, const char *restrict src, size_t srcSize) |
| strNCpy - copy src to dst More... | |
| char * | strLCpy (char *restrict dst, size_t dstSize, const char *restrict src) |
| strLCpy - copy src to dst More... | |
| char * | strCat (char *restrict dst, const char *restrict src) |
| strCat - concatenate two strings More... | |
| char * | strNCat (char *restrict dst, const char *restrict src, size_t srcLen) |
| strNCat - concatenate two strings More... | |
| char * | strLCat (char *restrict dst, size_t dstSize, const char *restrict src) |
| strLCat - concatenate two strings More... | |
| char * | strLNCat (char *restrict dst, size_t dstSize, const char *restrict src, size_t srcLen) |
| strLNCat - concatenate two strings More... | |
| char * | catSF (const char *paramType,...) |
| cat String Function More... | |
| char * | iCatSF (char *dst, const char *paramType,...) |
| cat and copy String Function dst has to be big enough to hold the result More... | |
| char * | bLCatSF (char *dst, size_t dstSize, const char *paramType,...) |
| cat and copy String Function More... | |
| char * | formatS (const char *fmt,...) |
| format string allocate and format string using asprintf More... | |
| char * | bFormatS (char *string, const char *fmt,...) |
| format string More... | |
| char * | bLFormatS (char *string, size_t stringSize, const char *fmt,...) |
| format string More... | |
| char * | appendS (const char *string1, const char *string2) |
| append strings More... | |
| char * | appendCharS (const char *string1, char c) |
| append char to string when c is 0 the result is string1 More... | |
| char * | appendSChar (char c, const char *string2) |
| append string to char More... | |
| char * | iAppendS (char **string1, const char *string2) |
| append strings More... | |
| char * | iAppendCharS (char **string1, char c) |
| append char to string More... | |
| char * | iAppendNFreeS (char **string1, char *string2) |
| append and free strings More... | |
| char * | iAppendManySF (char **string, const char *paramType,...) |
| append many strings More... | |
| char * | bAppendManySF (char *string, const char *paramType,...) |
| buffer append many strings More... | |
| char * | bLAppendManySF (char *string, size_t stringSize, const char *paramType,...) |
| buffer size append many strings More... | |
| char * | prependS (const char *string1, const char *string2) |
| prepend strings More... | |
| char * | prependCharS (const char *string1, char c) |
| prepend char to string More... | |
| char * | prependSChar (char c, const char *string2) |
| prepend string to char More... | |
| char * | iPrependS (char **string1, const char *string2) |
| prepend strings More... | |
| char * | iPrependCharS (char **string1, char c) |
| prepend char to string More... | |
| char * | iPrependNFreeS (char **string1, char *string2) |
| prepend and free strings More... | |
| char * | bPrependS (char *string1, const char *string2) |
| buffer prepend strings More... | |
| char * | bLPrependS (char *string1, size_t string1Size, const char *string2) |
| buffer prepend strings More... | |
| char * | replaceS (const char *s, const char *olds, const char *news, size_t max) |
| replace String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | replaceCharSS (const char *s, char olds, const char *news, size_t max) |
| char * | replaceSCharS (const char *s, const char *olds, char news, size_t max) |
| char * | replaceCharCharS (const char *s, char olds, char news, size_t max) |
| size_t | replaceSLen (const char *s, const char *olds, const char *news, size_t max) |
| replaceSLen returns the length of the resulting string More... | |
| char * | iReplaceS (char **s, const char *olds, const char *news, size_t max) |
| replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | iReplaceCharSS (char **s, char olds, const char *news, size_t max) |
| char * | iReplaceSCharS (char **s, const char *olds, char news, size_t max) |
| char * | iReplaceCharCharS (char **s, char olds, char news, size_t max) |
| char * | bReplaceS (char *s, const char *olds, const char *news, size_t max) |
| buffer replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | bLReplaceS (char *s, size_t sSize, const char *olds, const char *news, size_t max) |
| buffer size replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | replaceManySF (const char *paramType,...) |
| replace Many Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result More... | |
| char * | iReplaceManySF (char **s, char *paramType,...) |
| replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bReplaceManySF (char *s, char *paramType,...) |
| buffer replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bLReplaceManySF (char *s, size_t sSize, char *paramType,...) |
| buffer size replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| char * | icReplaceS (const char *s, const char *olds, const char *news, size_t max) |
| ignore case Replace String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | icReplaceCharSS (const char *s, char olds, const char *news, size_t max) |
| char * | icReplaceSCharS (const char *s, const char *olds, char news, size_t max) |
| char * | icReplaceCharCharS (const char *s, char olds, char news, size_t max) |
| char * | iicReplaceS (char **s, const char *olds, const char *news, size_t max) |
| in place ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | iicReplaceCharSS (char **s, char olds, const char *news, size_t max) |
| char * | iicReplaceSCharS (char **s, const char *olds, char news, size_t max) |
| char * | iicReplaceCharCharS (char **s, char olds, char news, size_t max) |
| char * | bicReplaceS (char *s, const char *olds, const char *news, size_t max) |
| buffer ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | bLicReplaceS (char *s, size_t sSize, const char *olds, const char *news, size_t max) |
| buffer size ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | icReplaceManySF (const char *paramType,...) |
| ignore case replace Many Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result More... | |
| char * | iicReplaceManySF (char **s, char *paramType,...) |
| in place ignore case replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bicReplaceManySF (char *s, char *paramType,...) |
| buffer ignore case replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bLicReplaceManySF (char *s, size_t sSize, char *paramType,...) |
| buffer size ignore case replace Many Strings the olds string is replaced with the news string max times in the result More... | |
| bool | eqS (const char *string1, const char *string2) |
| string Equal compare string1 to string2 More... | |
| bool | eqCharS (char c, const char *string2) |
| bool | eqSChar (const char *string1, char c) |
| bool | eqIS (const char *string1, const char *string2, int64_t index) |
| string Index Equal compare string1 at index to string2 when string2 is empty, the result is false More... | |
| bool | eqICharS (const char *string1, char c, int64_t index) |
| bool | startsWithS (const char *string1, const char *string2) |
| starts With String compare start of string1 with string2 More... | |
| bool | startsWithCharS (const char *string1, char c) |
| bool | endsWithS (const char *string1, const char *string2) |
| ends With String compare end of string1 with string2 More... | |
| bool | endsWithCharS (const char *string1, char c) |
| ssize_t | countS (const char *s, const char *needle) |
| count String count number of (non-overlapping) occurrences of a substring More... | |
| ssize_t | countCharS (const char *s, char c) |
| bool | icEqS (const char *string1, const char *string2) |
| ignore case string Equal compare string1 to string2 More... | |
| bool | icEqCharS (char c, const char *string2) |
| bool | icEqSChar (const char *string1, char c) |
| bool | icEqIS (const char *string1, const char *string2, int64_t index) |
| ignore case string Index Equal compare string1 at index to string2 when string2 is empty, the result is false More... | |
| bool | icEqICharS (const char *string1, char c, int64_t index) |
| bool | icStartsWithS (const char *string1, const char *string2) |
| ignore case starts With String compare start of string1 with string2 More... | |
| bool | icStartsWithCharS (const char *string1, char c) |
| bool | icEndsWithS (const char *string1, const char *string2) |
| ignore case ends With String compare end of string1 with string2 More... | |
| bool | icEndsWithCharS (const char *string1, char c) |
| ssize_t | icCountS (const char *s, const char *needle) |
| ignore case count String count number of (non-overlapping) occurrences of a substring More... | |
| ssize_t | icCountCharS (const char *s, char c) |
| bool | hasCtrlChar (const char *string) |
| has control char More... | |
| char * | stripCtrlS (const char *string) |
| remove terminal control char from string More... | |
| char * | iStripCtrlS (char **string) |
| remove terminal control char from string More... | |
| char * | bStripCtrlS (char *string) |
| remove terminal control char from string More... | |
| char * | stripColorsS (const char *string) |
| remove ansi colors from string More... | |
| char * | iStripColorsS (char **string) |
| remove ansi colors from string More... | |
| char * | bStripColorsS (char *string) |
| remove terminal control char from string More... | |
| char * | quoteS (const char *s, char delim) |
| add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string More... | |
| char * | bQuoteS (char *dest, const char *s, char delim) |
| add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string More... | |
| char * | bLQuoteS (char *dest, size_t destSize, const char *s, char delim) |
| add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string More... | |
| size_t | quoteLenS (const char *s, char delim) |
| return the length of the escaped string (without the terminating \0) More... | |
| char * | escapeS (const char *s, char delim) |
| escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct More... | |
| char * | bEscapeS (char *dest, const char *s, char delim) |
| escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct More... | |
| char * | bLEscapeS (char *dest, size_t destSize, const char *s, char delim) |
| escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct More... | |
| size_t | escapeLenS (const char *s, char delim) |
| return the length of the escaped string (without the terminating \0) More... | |
| char | nibbleToHex (u8 n) |
| convert number between 0 and 15 to hexadecimal character '0' to 'F' More... | |
| char * | cEscapeS (const char *S) |
| escape string to become a valid C source string control characters, backslash and double quotes are escaped. More... | |
| char * | bCEscapeS (char *dest, const char *S) |
| escape string to become a valid C source string control characters, backslash and double quotes are escaped. More... | |
| char * | bLCEscapeS (char *dest, size_t destSize, const char *S) |
| escape string to become a valid C source string control characters, backslash and double quotes are escaped. More... | |
| size_t | cEscapeLenS (const char *s) |
| return the length of the escaped string (without the terminating \0) More... | |
| bool | isNumber (const char *string) |
| is Number (integer or float) String More... | |
| bool | isInt (const char *string) |
| is Integer String More... | |
| int64_t | parseInt (const char *string) |
| convert string to decimal integer More... | |
| int64_t | parseIntChar (char c) |
| int64_t | parseI64 (const char *string) |
| convert string to decimal integer More... | |
| int64_t | parseI64Char (char c) |
| double | parseDouble (const char *string) |
| convert string to double More... | |
| double | parseDoubleChar (char c) |
| uint64_t | parseHex (const char *string) |
| parse hexadecimal number in a string More... | |
| char * | intToS (int64_t n) |
| int To String More... | |
| char * | bIntToS (char *s, int64_t n) |
| buffer int To String More... | |
| char * | doubleToS (double n) |
| double To String More... | |
| char * | bDoubleToS (char *s, double n) |
| buffer double To String More... | |
| size_t | lenS (const char *string) |
| length string More... | |
| size_t | sizeS (const char *string) |
| string buffer size More... | |
| char * | upperS (const char *string) |
| upper case String duplicate string More... | |
| char * | iUpperS (char **string) |
| upper case String More... | |
| char * | bUpperS (char *string) |
| buffer upper case String More... | |
| char * | lowerS (const char *string) |
| lower case String duplicate string More... | |
| char * | iLowerS (char **string) |
| lower case String More... | |
| char * | bLowerS (char *string) |
| buffer lower case String More... | |
| char * | trimS (const char *string) |
| trim String duplicate string More... | |
| char * | iTrimS (char **string) |
| trim String More... | |
| char * | bTrimS (char *string) |
| buffer trim String More... | |
| char * | lTrimS (const char *string) |
| left trim String duplicate string More... | |
| char * | iLTrimS (char **string) |
| left trim String More... | |
| char * | bLTrimS (char *string) |
| buffer left trim String More... | |
| char * | rTrimS (const char *string) |
| right trim String duplicate string More... | |
| char * | iRTrimS (char **string) |
| right trim String More... | |
| char * | bRTrimS (char *string) |
| buffer right trim String More... | |
| char * | uniqS (const char *string, char c) |
| uniq String duplicate string More... | |
| char * | iUniqS (char **string, char c) |
| uniq String More... | |
| char * | bUniqS (char *string, char c) |
| buffer uniq String More... | |
| char * | icUniqS (const char *string, char c) |
| ignore case uniq String duplicate string More... | |
| char * | iicUniqS (char **string, char c) |
| in place ignore case uniq String More... | |
| char * | bicUniqS (char *string, char c) |
| ignore case buffer uniq String More... | |
| char * | repeatS (const char *string, size_t count) |
| repeat string count times More... | |
| char * | iRepeatS (char **string, size_t count) |
| repeat string count times More... | |
| char * | bRepeatS (char *dest, const char *string, size_t count) |
| repeat string count times More... | |
| char * | bLRepeatS (char *dest, size_t destSize, const char *string, size_t count) |
| repeat string count times More... | |
| char * | repeatCharS (char c, size_t count) |
| repeat char count times More... | |
| char * | bRepeatCharS (char *dest, char c, size_t count) |
| repeat char count times More... | |
| char * | bLRepeatCharS (char *dest, size_t destSize, char c, size_t count) |
| repeat char count times More... | |
| ssize_t | repeatLenS (const char *string, size_t count) |
| length of string repeated count times More... | |
| char * | ellipsisStartS (const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis start string More... | |
| char * | iEllipsisStartS (char **string, size_t targetLength, const char *ellipsisString) |
| ellipsis start string More... | |
| char * | bEllipsisStartS (char *dest, const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis start string More... | |
| char * | bLEllipsisStartS (char *dest, size_t destSize, const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis start string More... | |
| char * | ellipsisStartCharS (const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis start string More... | |
| char * | iEllipsisStartCharS (char **string, size_t targetLength, char ellipsisChar) |
| ellipsis start string More... | |
| char * | bEllipsisStartCharS (char *dest, const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis start string More... | |
| char * | bLEllipsisStartCharS (char *dest, size_t destSize, const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis start string More... | |
| ssize_t | ellipsisLenS (const char *string, size_t targetLength, const char *ellipsisString) |
| length of string after ellipsis More... | |
| char * | ellipsisEndS (const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis end string More... | |
| char * | iEllipsisEndS (char **string, size_t targetLength, const char *ellipsisString) |
| ellipsis end string More... | |
| char * | bEllipsisEndS (char *dest, const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis end string More... | |
| char * | bLEllipsisEndS (char *dest, size_t destSize, const char *string, size_t targetLength, const char *ellipsisString) |
| ellipsis end string More... | |
| char * | ellipsisEndCharS (const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis end string More... | |
| char * | iEllipsisEndCharS (char **string, size_t targetLength, char ellipsisChar) |
| ellipsis end string More... | |
| char * | bEllipsisEndCharS (char *dest, const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis end string More... | |
| char * | bLEllipsisEndCharS (char *dest, size_t destSize, const char *string, size_t targetLength, char ellipsisChar) |
| ellipsis end string More... | |
| char * | padStartS (const char *string, size_t targetLength, const char *padString) |
| pad start string More... | |
| char * | iPadStartS (char **string, size_t targetLength, const char *padString) |
| pad start string More... | |
| char * | bPadStartS (char *dest, const char *string, size_t targetLength, const char *padString) |
| pad start string More... | |
| char * | bLPadStartS (char *dest, size_t destSize, const char *string, size_t targetLength, const char *padString) |
| pad start string More... | |
| char * | padStartCharS (const char *string, size_t targetLength, char padChar) |
| pad start string More... | |
| char * | iPadStartCharS (char **string, size_t targetLength, char padChar) |
| pad start string More... | |
| char * | bPadStartCharS (char *dest, const char *string, size_t targetLength, char padChar) |
| pad start string More... | |
| char * | bLPadStartCharS (char *dest, size_t destSize, const char *string, size_t targetLength, char padChar) |
| pad start string More... | |
| ssize_t | padStartLenS (const char *string, size_t targetLength, const char *padString) |
| length of string after padStart More... | |
| char * | padEndS (const char *string, size_t targetLength, const char *padString) |
| pad end string More... | |
| char * | iPadEndS (char **string, size_t targetLength, const char *padString) |
| pad end string More... | |
| char * | bPadEndS (char *dest, const char *string, size_t targetLength, const char *padString) |
| pad end string More... | |
| char * | bLPadEndS (char *dest, size_t destSize, const char *string, size_t targetLength, const char *padString) |
| pad end string More... | |
| char * | padEndCharS (const char *string, size_t targetLength, char padChar) |
| pad end string More... | |
| char * | iPadEndCharS (char **string, size_t targetLength, char padChar) |
| pad end string More... | |
| char * | bPadEndCharS (char *dest, const char *string, size_t targetLength, char padChar) |
| pad end string More... | |
| char * | bLPadEndCharS (char *dest, size_t destSize, const char *string, size_t targetLength, char padChar) |
| pad end string More... | |
| ssize_t | padEndLenS (const char *string, size_t targetLength, const char *padString) |
| length of string after padEnd More... | |
| char | getS (const char *string, int64_t index) |
| get string More... | |
| char * | setS (char *string, int64_t index, char c) |
| set string More... | |
| char * | swapS (char *string, int64_t index1, int64_t index2) |
| swap characters in string More... | |
| char * | iSwapS (char **string, int64_t index1, int64_t index2) |
| swap characters in string More... | |
| char * | bSwapS (char *string, int64_t index1, int64_t index2) |
| swap characters in string More... | |
| char * | bLSwapS (char *string, size_t size, int64_t index1, int64_t index2) |
| swap characters in string More... | |
| char * | sliceS (const char *string, int64_t start, int64_t end) |
| slice String return new string which is the string between start and end negative indexes are allowed More... | |
| char * | iSliceS (char **string, int64_t start, int64_t end) |
| slice String return string which is the string between start and end negative indexes are allowed More... | |
| char * | bSliceS (char *string, int64_t start, int64_t end) |
| buffer slice String return string which is the string between start and end negative indexes are allowed More... | |
| char * | bLSliceS (char *string, size_t stringSize, int64_t start, int64_t end) |
| buffer size slice String return string which is the string between start and end negative indexes are allowed More... | |
| char * | cropS (char *string, int64_t start, int64_t end) |
| Crop String return a new string with characters from start and end in string and delete characters from start to end in the original string negative indexes are allowed. More... | |
| char * | iCropS (char **string, int64_t start, int64_t end) |
| Crop String return a new string with characters from start and end in string and delete characters from start to end in the original string negative indexes are allowed. More... | |
| char | cropElemS (char *string, int64_t index) |
| char | iCropElemS (char **string, int64_t index) |
| char * | insertS (const char *string, int64_t index, const char *toInsert) |
| insert string in string at index More... | |
| char * | insertNFreeS (const char *string, int64_t index, char *toInsert) |
| insert string in string at index and free toInsert when successful More... | |
| char * | iInsertS (char **string, int64_t index, const char *toInsert) |
| insert string in string at index More... | |
| char * | iInsertNFreeS (char **string, int64_t index, char *toInsert) |
| insert string in string at index and free toInsert More... | |
| char * | bInsertS (char *string, int64_t index, const char *toInsert) |
| buffer insert string in string at index More... | |
| char * | bLInsertS (char *string, size_t stringSize, int64_t index, const char *toInsert) |
| buffer size insert string in string at index More... | |
| char * | injectS (const char *string, int64_t index, char toInject) |
| inject a char in string at index More... | |
| char * | iInjectS (char **string, int64_t index, char toInject) |
| inject a char in string at index More... | |
| char * | bInjectS (char *string, int64_t index, char toInject) |
| buffer inject a char in string at index More... | |
| char * | bLInjectS (char *string, size_t stringSize, int64_t index, char toInject) |
| buffer size inject a char in string at index More... | |
| char * | delS (const char *string, int64_t start, int64_t end) |
| delete string More... | |
| char * | iDelS (char **string, int64_t start, int64_t end) |
| delete string More... | |
| char * | bDelS (char *string, int64_t start, int64_t end) |
| buffer delete string More... | |
| char * | bLDelS (char *string, size_t stringSize, int64_t start, int64_t end) |
| buffer size delete string More... | |
| char * | delElemS (const char *string, int64_t index) |
| delete element/character string More... | |
| char * | iDelElemS (char **string, int64_t index) |
| delete element/character string More... | |
| char * | bDelElemS (char *string, int64_t index) |
| buffer delete element/character string More... | |
| char * | bLDelElemS (char *string, size_t stringSize, int64_t index) |
| buffer size delete element/character string More... | |
| char * | findS (const char *string, const char *needle) |
| find String More... | |
| char * | findCharS (const char *string, char c) |
| ssize_t | indexOfS (const char *string, const char *needle) |
| indexOf String relative to start More... | |
| ssize_t | indexOfCharS (const char *string, char c) |
| bool | hasS (const char *string, const char *needle) |
| has String More... | |
| bool | hasCharS (const char *string, char c) |
| char * | icFindS (const char *string, const char *needle) |
| ignore case Find String More... | |
| char * | icFindCharS (const char *string, char c) |
| ssize_t | icIndexOfS (const char *string, const char *needle) |
| ignore case indexOf String relative to start More... | |
| ssize_t | icIndexOfCharS (const char *string, char c) |
| bool | icHasS (const char *string, const char *needle) |
| ignore case has String More... | |
| bool | icHasCharS (const char *string, char c) |
| char * | tokS (char *s, const char *delim, char **saveptr) |
| token in String More... | |
| char * | icTokS (char *s, const char *delim, char **saveptr) |
| ignore case token in String More... | |
| size_t | lenUTF8 (const char *s) |
| character length of UTF-8 string More... | |
| size_t | bLLenUTF8 (const char *s, size_t maxSize) |
| buffer character length of UTF-8 string More... | |
| bool | isUTF8 (const char *string) |
| is UTF-8 string More... | |
| bool | bLIsUTF8 (const char *string, size_t stringSize) |
| buffer length is UTF-8 string More... | |
| bool | isCodeUTF8 (const char *code) |
| is code point UTF8 encoded string More... | |
| const char * | nextUTF8 (const char *utf8) |
| next UTF-8 code point More... | |
| const char * | bLNextUTF8 (const char *string, size_t utf8Size, const char *utf8) |
| buffer length next UTF-8 code point More... | |
| const char * | findNextUTF8 (const char *string, size_t utf8Size, const char *utf8) |
| find next UTF-8 code point even not at the start of a code point More... | |
| const char * | prevUTF8 (const char *utf8) |
| previous UTF-8 code point More... | |
| const char * | bPrevUTF8 (const char *string, const char *utf8) |
| buffer previous UTF-8 code point More... | |
| local const char * | bPrevUTF8Tiny (const char *string, const char *utf8) |
| local char * | bPrevRWUTF8Tiny (const char *string, char *utf8) |
| const char * | idx2PtrUTF8 (const char *utf8, int64_t index) |
| index to pointer UTF8 encoded string More... | |
| local char * | idx2PtrRWUTF8 (char *utf8, int64_t index) |
| index to pointer UTF8 encoded string - read write utf8 string (char*) More... | |
| const char * | bLIdx2PtrUTF8 (const char *utf8, size_t utf8Size, int64_t index) |
| int64_t | ptr2IdxUTF8 (const char *utf8, const char *pos) |
| pointer to code point index UTF8 encoded string More... | |
| int64_t | bPtr2IdxUTF8 (const char *start, const char *utf8, const char *pos) |
| buffer pointer to code point index UTF8 encoded string More... | |
| int64_t | bLPtr2IdxUTF8 (const char *utf8, size_t utf8Size, const char *pos) |
| buffer size pointer to code point index UTF8 encoded string More... | |
| int64_t | bLPtr2NegIdxUTF8 (const char *utf8, size_t utf8Size, const char *pos) |
| buffer size pointer to negative code point index UTF8 encoded string More... | |
| char * | makeValidUTF8 (const char *utf8) |
| make valid UTF-8 encoded string More... | |
| char * | bMakeValidUTF8 (char *utf8) |
| buffer make valid UTF-8 encoded string More... | |
| char * | nMakeValidUTF8 (const char *utf8, size_t utf8Len) |
| length make valid UTF-8 encoded string More... | |
| char * | bNMakeValidUTF8 (char *dst, const char *utf8, size_t utf8Len) |
| buffer length make valid UTF-8 encoded string More... | |
| char * | bLMakeValidUTF8 (char *dst, size_t dstSize, const char *utf8) |
| buffer destination size make valid UTF-8 encoded string More... | |
| char * | bLNMakeValidUTF8 (char *dst, size_t dstSize, const char *utf8, size_t utf8Len) |
| buffer destination size source length make valid UTF-8 encoded string More... | |
| char * | strNCpyUTF8 (char *dst, const char *src, size_t srcLen) |
| strNCpyUTF8 - copy src to dst with srcLen in code points More... | |
| char * | strLCpyUTF8 (char *dst, size_t dstSize, const char *src) |
| strLCpyUTF8 - copy src to dst More... | |
| char * | strNCatUTF8 (char *dst, const char *src, size_t srcLen) |
| strNCatUTF8 - concatenate two UTF-8 encoded strings More... | |
| char * | strLCatUTF8 (char *dst, size_t dstSize, const char *src) |
| strLCatUTF8 - concatenate two UTF-8 encoded strings More... | |
| char * | strLNCatUTF8 (char *dst, size_t dstSize, const char *src, size_t srcLen) |
| strLNCatUTF8 - concatenate two UTF-8 encoded strings More... | |
| char * | icReplaceUTF8 (const char UNUSED *s, const char UNUSED *olds, const char UNUSED *news, size_t UNUSED max) |
| ignore case Replace UTF8 encoded String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | icReplaceCharSUTF8 (const char *s UNUSED, char olds UNUSED, const char *news UNUSED, size_t max UNUSED) |
| char * | icReplaceSCharUTF8 (const char *s UNUSED, const char *olds UNUSED, char news UNUSED, size_t max UNUSED) |
| char * | iicReplaceUTF8 (char UNUSED **s, const char UNUSED *olds, const char UNUSED *news, size_t UNUSED max) |
| in place ignore case replace UTF8 encoded String the olds UTF8 encoded string is replaced with the news UTF8 encoded string max times in the result 0 for max means replace all olds strings More... | |
| char * | iicReplaceCharSUTF8 (char **s UNUSED, char olds UNUSED, const char *news UNUSED, size_t max UNUSED) |
| char * | iicReplaceSCharUTF8 (char **s UNUSED, const char *olds UNUSED, char news UNUSED, size_t max UNUSED) |
| char * | bicReplaceUTF8 (char UNUSED *s, const char UNUSED *olds, const char UNUSED *news, size_t UNUSED max) |
| buffer ignore case replace UTF8 encoded String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | bLicReplaceUTF8 (char UNUSED *s, size_t UNUSED sSize, const char UNUSED *olds, const char UNUSED *news, size_t max UNUSED) |
| buffer size ignore case replace UTF8 encoded String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings More... | |
| char * | icReplaceManyUTF8F (const char *paramType UNUSED,...) |
| ignore case replace Many UTF8 encoded Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result More... | |
| char * | iicReplaceManyUTF8F (char **s UNUSED, char *paramType UNUSED,...) |
| in place ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bicReplaceManyUTF8F (char *s UNUSED, char *paramType UNUSED,...) |
| buffer ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result More... | |
| char * | bLicReplaceManyUTF8F (char *s UNUSED, size_t sSize UNUSED, char *paramType UNUSED,...) |
| buffer size ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result More... | |
| bool | eqIUTF8 (const char *string1, const char *string2, int64_t index) |
| UTF8 encoded string Index Equal compare string1 at character index to string2 when string2 is empty, the result is false. More... | |
| bool | eqICharUTF8 (const char *string1, char c, int64_t index) |
| bool | icEqUTF8 (const char *string1, const char *string2) |
| ignore case UTF8 encoded string Equal compare string1 to string2 More... | |
| bool | icEqCharUTF8 (char c, const char *string2) |
| bool | icEqUTF8Char (const char *string1, char c) |
| bool | icEqIUTF8 (const char *string1 UNUSED, const char *string2 UNUSED, int64_t index UNUSED) |
| ignore case UTF8 encoded string Index Equal compare string1 at character index to string2 when string2 is empty, the result is false More... | |
| bool | icEqICharUTF8 (const char *string1 UNUSED, char c UNUSED, int64_t index UNUSED) |
| bool | icStartsWithUTF8 (const char *string1, const char *string2) |
| ignore case starts With UTF8 encoded String compare start of string1 with string2 More... | |
| bool | icEndsWithUTF8 (const char *string1, const char *string2) |
| ignore case ends With UTF8 encoded String compare end of string1 with string2 More... | |
| ssize_t | icCountUTF8 (const char *s, const char *needle) |
| ignore case count UTF8 encoded String count number of (non-overlapping) occurrences of a substring More... | |
| internal localeType | getLocaleType (void) |
| some case convertions depend on the current LOCALE More... | |
| rune | code2RuneUTF8 (const char *code) |
| UTF-8 code point to rune. More... | |
| rune | code2RuneLUTF8 (const char *code, uint8_t *n) |
| UTF-8 code point to rune and length. More... | |
| size_t | bRune2CodeUTF8 (char *dst, rune c) |
| rune to UTF-8 code point More... | |
| uint8_t | runeLenUTF8 (rune r) |
| rune length as UTF-8 code point More... | |
| internal size_t | decompose_hangul (rune s, rune *r) |
| internal const char * | find_decomposition (rune ch) |
| internal size_t | runeFullyDecompose (rune ch, rune *result, size_t resultLen) |
| internal size_t | output_marks (const char **p_inout, char *dst, bool remove_dot) |
| internal size_t | output_special_case (char *dst, int offset, int type, int which) |
| rune | toupperUTF8 (rune c) |
| rune toupper UTF8 More... | |
| internal size_t | _upperUTF8 (char *dst, const char *utf8, localeType lcl) |
| char * | upperUTF8 (const char *utf8) |
| upper case UTF-8 encoded string duplicate string More... | |
| char * | iUpperUTF8 (char **utf8) |
| upper case UTF-8 encoded string More... | |
| char * | bUpperUTF8 (char *utf8 UNUSED) |
| buffer upper case String More... | |
| local int | runeCombiningClass (rune uc) |
| runeCombiningClass: : a Unicode character More... | |
| internal bool | has_more_above (const char *str) |
| rune | tolowerUTF8 (rune c) |
| rune tolower UTF8 More... | |
| internal size_t | _lowerUTF8 (char *dst, const char *utf8, localeType lcl) |
| char * | lowerUTF8 (const char *utf8) |
| lower case UTF-8 String duplicate string More... | |
| char * | iLowerUTF8 (char **utf8) |
| lower case String More... | |
| char * | bLowerUTF8 (char *string UNUSED) |
| buffer lower case String More... | |
| char * | casefoldUTF8 (const char *utf8) |
| casefold UTF-8 encoded string More... | |
| char * | uniqUTF8 (const char *string, const char *code) |
| uniq UTF-8 String duplicate string More... | |
| char * | iUniqUTF8 (char **string, const char *code) |
| uniq UTF-8 String More... | |
| char * | bUniqUTF8 (char *string, const char *code) |
| buffer uniq String More... | |
| char * | icUniqUTF8 (const char *string UNUSED, const char *code UNUSED) |
| ignore case uniq String duplicate string More... | |
| char * | iicUniqUTF8 (char **string UNUSED, const char *code UNUSED) |
| in place ignore case uniq String More... | |
| char * | bicUniqUTF8 (char *string UNUSED, char c UNUSED) |
| ignore case buffer uniq String More... | |
| rune | getUTF8 (const char *string, int64_t index) |
| get UTF8 encoded string More... | |
| char * | setUTF8 (char *string, int64_t index, rune c) |
| set UTF8 encoded string More... | |
| char * | sliceUTF8 (const char *string, int64_t start, int64_t end) |
| slice UTF8 encoded String return new string which is the string between start and end negative indexes are allowed More... | |
| char * | iSliceUTF8 (char **string, int64_t start, int64_t end) |
| slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed More... | |
| char * | bSliceUTF8 (char *string, int64_t start, int64_t end) |
| buffer slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed More... | |
| char * | bLSliceUTF8 (char *string, size_t stringSize, int64_t start, int64_t end) |
| buffer size slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed More... | |
| char * | insertUTF8 (const char *string, int64_t index, const char *toInsert) |
| insert string in UTF8 encoded string at index More... | |
| char * | insertNFreeUTF8 (const char *string, int64_t index, char *toInsert) |
| insert string in UTF8 encoded string at index and free toInsert More... | |
| char * | iInsertUTF8 (char **string, int64_t index, const char *toInsert) |
| insert string in UTF8 encoded string at index More... | |
| char * | iInsertNFreeUTF8 (char **string, int64_t index, char *toInsert) |
| insert string in UTF8 encoded string at index and free toInsert More... | |
| char * | bInsertUTF8 (char *string, int64_t index, const char *toInsert) |
| buffer insert string in UTF8 encoded string at index More... | |
| char * | bLInsertUTF8 (char *string, size_t stringSize, int64_t index, const char *toInsert) |
| buffer size insert string in UTF8 encoded string at index More... | |
| char * | delUTF8 (const char *string, int64_t start, int64_t end) |
| delete UTF8 encoded string More... | |
| char * | iDelUTF8 (char **string, int64_t start, int64_t end) |
| delete UTF8 encoded string More... | |
| char * | bDelUTF8 (char *string, int64_t start, int64_t end) |
| buffer delete UTF8 encoded string More... | |
| char * | bLDelUTF8 (char *string, size_t stringSize, int64_t start, int64_t end) |
| buffer size delete UTF8 encoded string More... | |
| ssize_t | indexOfUTF8 (const char *string, const char *needle) |
| indexOf UTF8 encoded String relative to start More... | |
| ssize_t | icIndexOfUTF8 (const char *string UNUSED, const char *needle UNUSED) |
| ignore case indexOf UTF8 encoded String relative to start More... | |
| bool | icHasUTF8 (const char *string, const char *needle) |
| ignore case has UTF8 encoded String More... | |
| char * | icTokUTF8 (const char *s UNUSED, const char *delim UNUSED, char **saveptr UNUSED) |
| ignore case token in UTF8 encoded String More... | |
| char ** | icSplitUTF8 (const char *string UNUSED, const char *delim UNUSED) |
| ignore case split UTF8 encoded string with delim string return list More... | |
| char ** | icExtractUTF8 (const char *string UNUSED, const char *delim1 UNUSED, const char *delim2 UNUSED) |
| ignore case extract UTF8 encoded string between delim1 and delim2 strings return list More... | |
| char ** | icExtractCharSUTF8 (const char *string UNUSED, char delim1 UNUSED, const char *delim2 UNUSED) |
| char ** | icExtractSCharUTF8 (const char *string UNUSED, const char *delim1 UNUSED, char delim2 UNUSED) |
| internal int | icListSortUTF8Cmp (const void *a, const void *b) |
| ignore case list Sort UTF-8 encoded String Compare function More... | |
| char ** | icListSortUTF8 (char **list) |
| ignore case list Sort UTF8 encoded String duplicate list and sort More... | |
| char ** | iicListSortUTF8 (char ***list) |
| ignore case list Sort UTF8 encoded String More... | |
| bool | icListEqUTF8 (char **list1, char **list2) |
| ignore case list Equal UTF8 encoded String compare each element of list1 and list2 More... | |
| bool | icListHasUTF8 (char **list, const char *string) |
| ignore case and return true when list has UTF8 encoded string More... | |
| ssize_t | icListIndexOfUTF8 (char **list, const char *string) |
| ignore case and return index of UTF8 encoded string in list More... | |
| ssize_t | icListBinarySearchUTF8 (char **list, const char *string) |
| ignore case list binary search UTF8 encoded string More... | |
| char ** | icListUniqUTF8 (char **list) |
| ignore case and uniquify UTF8 encoded elements of list duplicate list each elements are unique in the new list More... | |
| char ** | iicListUniqUTF8 (char ***list) |
| ignore case and uniquify UTF8 encoded elements of list each elements are unique in the list More... | |
| char * | emptySF (void) |
| empty String Function More... | |
| char * | iEmptySF (char **string) |
| empty String Function More... | |
| bool | isEmptyS (const char *string) |
| is Empty String More... | |
| bool | isBlankS (const char *string) |
| is Blank String More... | |
| ssize_t | intIndex (int64_t index, int64_t length) |
| int to positive index index can be negative More... | |
| char ** | listEmptySF (void) |
| list Empty String Function More... | |
| char ** | iListEmptySF (char ***list) |
| list Empty String Function More... | |
| bool | listIsEmptyS (char **list) |
| list Is Empty String More... | |
| bool | listIsBlankS (char **list) |
| list Is Empty String More... | |
| char ** | listCreateSF (const char *paramType,...) |
| list Create String Function create a list from the list of parameters used from the listCreateS(...) macro More... | |
| char ** | listFromArrayS (char **array, size_t size) |
| list From Array String More... | |
| char ** | listFromCArrayS (const char **array, size_t size) |
| list From Const Array String More... | |
| char ** | listPushS (char ***list, const char *s) |
| list Push String append s at the end of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list More... | |
| char ** | listPushCharS (char ***list, char c) |
| char ** | iListPushS (char ***list, char *s) |
| list Push String append s pointer at the end of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list More... | |
| char * | listPopS (char ***list) |
| list Pop String return last string from list and remove last element from the list More... | |
| char ** | listPrependS (char ***list, const char *s) |
| list Prepend String append s at the beginning of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, the operation is canceled More... | |
| char ** | listPrependCharS (char ***list, char c) |
| char ** | iListPrependS (char ***list, char *s) |
| list Prepend String append s pointer at the beginning of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, the operation is canceled More... | |
| char * | listDequeueS (char ***list) |
| list Dequeue String return first string from list and remove it from the list More... | |
| void | listFreeS (char **list) |
| list Free String More... | |
| void | listFreeManySF (char **paramType,...) |
| list free many String More... | |
| size_t | listLengthS (char **list) |
| list Length String return number of elements until the first NULL element More... | |
| size_t | listLengthCS (const char **list) |
| const list Length String return number of elements until the first NULL element More... | |
| ssize_t | listStrLengthS (char **list) |
| list String Length String More... | |
| ssize_t | listIntIndexS (char **list, int64_t index) |
| list int to index String index can be negative More... | |
| char ** | listAddrS (char **list, int64_t index) |
| list address String index can be negative More... | |
| char * | listGetS (char **list, int64_t index) |
| list Get String duplicate string at given index index can be negative More... | |
| char * | iListGetS (char **list, int64_t index) |
| list Get String index can be negative More... | |
| char * | listGetCS (const char **list, int64_t index) |
| const list Get String duplicate string at given index index can be negative More... | |
| const char * | iListGetCS (const char **list, int64_t index) |
| const list Get String index can be negative More... | |
| char ** | listSetS (char **list, int64_t index, const char *s) |
| list Set String duplicate string and store at given index, the existing element is freed index can be negative More... | |
| char ** | listSetCharS (char **list, int64_t index, char c) |
| char ** | iListSetS (char **list, int64_t index, char *s) |
| list Set String store string at given index index can be negative More... | |
| char ** | listSwapS (char **list, int64_t index1, int64_t index2) |
| swap elements in list More... | |
| char ** | iListSwapS (char **list, int64_t index1, int64_t index2) |
| swap elements in list More... | |
| char ** | split (const char *string, const char *delim) |
| split string with delim string when updating this function, also update splitS (identical to split) return list More... | |
| char ** | splitS (const char *string, const char *delim) |
| char ** | splitChar (const char *string, char delim) |
| char ** | icSplit (const char *string, const char *delim) |
| ignore case split string with delim string when updating this function, also update icSplitS (identical to icSplit) return list More... | |
| char ** | icSplitS (const char *string, const char *delim) |
| char ** | icSplitChar (const char *string, char delim) |
| ssize_t | joinLength (char **list, const char *delim) |
| join Length list length after joined with delimiter More... | |
| char * | join (char **list, const char *delim) |
| join list, the elements are seperated with delim in the resulting string when updating this function, also update joinS (identical to join) More... | |
| char * | joinS (char **list, const char *delim) |
| char * | joinCS (const char **list, const char *delim) |
| join list, the elements are seperated with delim in the resulting string More... | |
| char * | joinChar (char **list, char delim) |
| char * | bJoin (char *string, char **list, const char *delim) |
| buffer join list, the elements are seperated with delim in the resulting string More... | |
| char * | bJoinChar (char *string, char **list, char delim) |
| char * | bLJoin (char *string, size_t stringSize, char **list, const char *delim) |
| buffer size join list, the elements are seperated with delim in the resulting string More... | |
| char * | bLJoinChar (char *string, size_t stringSize, char **list, char delim) |
| char ** | extractS (const char *string, const char *delim1, const char *delim2) |
| extract string between delim1 and delim2 strings return list More... | |
| char ** | extractCharSS (const char *string, char delim1, const char *delim2) |
| char ** | extractSCharS (const char *string, const char *delim1, char delim2) |
| char ** | extractCharCharS (const char *string, char delim1, char delim2) |
| char ** | icExtractS (const char *string, const char *delim1, const char *delim2) |
| ignore case extract string between delim1 and delim2 strings return list More... | |
| char ** | icExtractCharSS (const char *string, char delim1, const char *delim2) |
| char ** | icExtractSCharS (const char *string, const char *delim1, char delim2) |
| char ** | icExtractCharCharS (const char *string, char delim1, char delim2) |
| char ** | listDupS (char **list) |
| list Duplicate String More... | |
| char ** | listDupCS (const char **list) |
| const list Duplicate String More... | |
| char ** | iListDupS (char **list) |
| list Duplicate String More... | |
| char ** | listReverseS (char **list) |
| list Reverse String duplicate and reverse list, the last element is the first element of the new list More... | |
| char ** | iListReverseS (char ***list) |
| list Reverse String reverse list, the last element is the first element of the list More... | |
| char ** | listCatSF (char **paramType,...) |
| list Cat String More... | |
| char ** | listAppendS (char ***list1, char **list2) |
| list Append String Append list2 at the end of list1 More... | |
| char ** | iListAppendS (char ***list1, char **list2) |
| in place list Append String Append list2 at the end of list1 by copying the pointers from list2 to list1. More... | |
| char ** | iListAppendNSmashS (char ***list1, char **list2) |
| list Append and smash list2 Append list2 at the end of list1 by copying the pointers from list2 to list1. More... | |
| char ** | listShiftS (char ***list1, char **list2) |
| list Shift String Append list2 at the start of list1 More... | |
| char ** | iListShiftS (char ***list1, char **list2) |
| in place list Shift String Append list2 at the start of list1 by copying the pointers from list2 to list1. More... | |
| char ** | iListShiftNSmashS (char ***list1, char **list2) |
| list Append and smash list2 Append list2 at the start of list1 by copying the pointers from list2 to list1. More... | |
| char ** | listAddS (char **list1, char **list2) |
| list Add String add list1 and list2 in a new list More... | |
| char ** | listAddCS (char **list1, const char **list2) |
| const list Add String add list1 and list2 in a new list More... | |
| char ** | listSliceS (char **list, int64_t start, int64_t end) |
| list Slice String return new list with elements from start and end in list negative indexes are allowed More... | |
| char ** | iListCopyS (char **list, int64_t start, int64_t end) |
| list Copy String return new list with element pointers from start and end in list negative indexes are allowed More... | |
| char ** | iListSliceS (char ***list, int64_t start, int64_t end) |
| list Slice String return list with elements from start and end in list negative indexes are allowed More... | |
| char ** | listCropS (char **list, int64_t start, int64_t end) |
| list Crop String return a new list with elements from start and end in list and delete elements from start to end in the original list negative indexes are allowed More... | |
| char ** | iListCropS (char ***list, int64_t start, int64_t end) |
| list Crop String return a new list with elements from start and end in list and delete elements from start to end in the original list negative indexes are allowed More... | |
| char * | listCropElemS (char **list, int64_t index) |
| list Crop Element String return element at index and delete element at index in the original list negative indexes are allowed More... | |
| char * | iListCropElemS (char ***list, int64_t index) |
| list Crop Element String return element at index and delete element at index in the original list negative indexes are allowed More... | |
| char ** | listInsertS (char **list, int64_t index, char **toInsert) |
| list Insert string More... | |
| char ** | iListInsertS (char ***list, int64_t index, char **toInsert) |
| list Insert string More... | |
| char ** | iListInsertNFreeS (char ***list, int64_t index, char **toInsert) |
| list Insert string and free toInsert More... | |
| char ** | listInjectS (char **list, int64_t index, char *toInject) |
| list Inject string More... | |
| char ** | listInjectCharS (char **list, int64_t index, char toInject) |
| char ** | iListInjectS (char ***list, int64_t index, char *toInject) |
| list Inject string More... | |
| char ** | iListInjectCharS (char ***list, int64_t index, char toInject) |
| char ** | listDelS (char **list, int64_t start, int64_t end) |
| list Delete String return new list without elements from start and end in list negative indexes are allowed More... | |
| char ** | iListDelS (char ***list, int64_t start, int64_t end) |
| list Delete String return list without elements from start and end in list negative indexes are allowed More... | |
| char ** | iListRemoveS (char ***list, int64_t start, int64_t end) |
| list Remove String return list without elements from start and end in list the elements are removed without being freed negative indexes are allowed More... | |
| char ** | listDelElemS (char **list, int64_t index) |
| list Delete Element String return new list without the element at index negative indexes are allowed More... | |
| char ** | iListDelElemS (char ***list, int64_t index) |
| list Delete Element String return list without the element at index negative indexes are allowed More... | |
| char ** | iListRemoveElemS (char ***list, int64_t index) |
| list Remove Element String return list without the element at index the element is removed without being freed negative indexes are allowed More... | |
| int | listPrintS (char **list) |
| print list elements to stdout More... | |
| int | listPrintCS (const char **list) |
| internal int | listSortSCmp (const void *a, const void *b) |
| list Sort String Compare function More... | |
| char ** | listSortS (char **list) |
| list Sort String duplicate list and sort More... | |
| char ** | iListSortS (char ***list) |
| list Sort String More... | |
| char ** | listSortFS (char **list, shCmpt compareFunction) |
| list Sort String duplicate list and sort More... | |
| char ** | iListSortFS (char ***list, shCmpt compareFunction) |
| list Sort String More... | |
| internal int | icListSortSCmp (const void *a, const void *b) |
| ignore case list Sort String Compare function More... | |
| char ** | icListSortS (char **list) |
| ignore case list Sort String duplicate list and sort More... | |
| char ** | iicListSortS (char ***list) |
| ignore case list Sort String More... | |
| char ** | readText (const char *filePath) |
| return text from filePath in a list new line characters are removed More... | |
| char ** | readStream (FILE *fp) |
| return text from stream fp in a list new line characters are removed More... | |
| bool | writeText (const char *filePath, char **list) |
| write list to filePath More... | |
| bool | writeCText (const char *filePath, const char **list) |
| write const list to filePath More... | |
| bool | writeStream (FILE *fp, char **list) |
| write list to stream More... | |
| bool | writeCStream (FILE *fp, const char **list) |
| write const list to stream More... | |
| bool | appendText (const char *filePath, char **list) |
| append list to filePath More... | |
| bool | appendCText (const char *filePath, const char **list) |
| append const list to filePath More... | |
| char ** | execOut (const char *cmd) |
| execute command return stdout from cmd More... | |
| char ** | systemOutf (const char *fmt,...) |
| execute system command with formatting More... | |
| int | systemf (const char *fmt,...) |
| execute system command with formatting More... | |
| int | commandF (const char *cmd, int line, const char *thisFunc, const char *thisFileName) |
| run command in default shell More... | |
| int | commandfF (int line, const char *thisFunc, const char *thisFileName, const char *fmt,...) |
| run command with formatting in default shell More... | |
| int | commandNFreeF (char *cmd, int line, const char *thisFunc, const char *thisFileName) |
| run command in default shell and free the cmd parameter More... | |
| bool | listEqS (char **list1, char **list2) |
| list Equal String compare each element of list1 and list2 More... | |
| bool | listEqCS (char **list1, const char **list2) |
| const(list2) list Equal String compare each element of list1 and list2 More... | |
| bool | listEqC1S (const char **list1, char **list2) |
| const(list1) list Equal String compare each element of list1 and list2 More... | |
| bool | listEqCCS (const char **list1, const char **list2) |
| const(list1 and 2) list Equal String compare each element of list1 and list2 More... | |
| bool | listHasS (char **list, const char *string) |
| return true when list has string More... | |
| bool | listHasCS (const char **list, const char *string) |
| return true when const list has string More... | |
| bool | listHasCharS (char **list, char c) |
| bool | listHasCharCS (const char **list, char c) |
| ssize_t | listIndexOfS (char **list, const char *string) |
| return index of string in list More... | |
| ssize_t | listIndexOfCS (const char **list, const char *string) |
| return index of string in const list More... | |
| ssize_t | listIndexOfCharS (char **list, char c) |
| ssize_t | listIndexOfCharCS (const char **list, char c) |
| ssize_t | listBinarySearchS (char **list, const char *string) |
| list binary search string More... | |
| ssize_t | listBinarySearchCharS (char **list, char c) |
| char ** | listUniqS (char **list) |
| Uniquify elements of list duplicate list each elements are unique in the new list. More... | |
| char ** | iListUniqS (char ***list) |
| Uniquify elements of list each elements are unique in the list. More... | |
| bool | icListEqS (char **list1, char **list2) |
| ignore case list Equal String compare each element of list1 and list2 More... | |
| bool | icListEqCS (char **list1, const char **list2) |
| ignore case const(list2) list Equal String compare each element of list1 and list2 More... | |
| bool | icListEqC1S (const char **list1, char **list2) |
| ignore case const(list1) list Equal String compare each element of list1 and list2 More... | |
| bool | icListEqCCS (const char **list1, const char **list2) |
| ignore case const(list1 and 2) list Equal String compare each element of list1 and list2 More... | |
| bool | icListHasS (char **list, const char *string) |
| ignore case and return true when list has string More... | |
| bool | icListHasCharS (char **list, char c) |
| bool | icListHasCS (const char **list, const char *string) |
| ignore case and return true when const list has string More... | |
| bool | icListHasCharCS (const char **list, char c) |
| ssize_t | icListIndexOfS (char **list, const char *string) |
| ignore case and return index of string in list More... | |
| ssize_t | icListIndexOfCS (const char **list, const char *string) |
| ignore case and return index of string in const list More... | |
| ssize_t | icListIndexOfCharS (char **list, char c) |
| ssize_t | icListIndexOfCharCS (const char **list, char c) |
| ssize_t | icListBinarySearchS (char **list, const char *string) |
| ignore case list binary search string More... | |
| ssize_t | icListBinarySearchCharS (char **list, char c) |
| char ** | icListUniqS (char **list) |
| ignore case and uniquify elements of list duplicate list each elements are unique in the new list More... | |
| char ** | iicListUniqS (char ***list) |
| ignore case and uniquify elements of list each elements are unique in the list More... | |
| char ** | listCompactS (char **list) |
| remove empty strings from list More... | |
| char ** | iListCompactS (char ***list) |
| remove empty strings from list More... | |
| void | btraceEnable (void) |
| void | btraceDisable (void) |
| bool | btraceConfig (void) |
| void ** | listEmptyF (void) |
| list Empty Function More... | |
| void ** | iListEmptyF (void ***list) |
| list Empty Function More... | |
| bool | listIsEmpty (void **list) |
| list Is Empty More... | |
| void ** | listCreateF (void *paramType,...) |
| list Create Function create a list from the list of parameters used from the listCreate(...) macro More... | |
| void ** | listFromArray (void **array, size_t size) |
| list From Array More... | |
| void ** | listPush (void ***list, void *s) |
| list Push More... | |
| void * | listPop (void ***list) |
| list Pop return last element from list and remove last element from the list More... | |
| void ** | listPrepend (void ***list, void *s) |
| list Prepend More... | |
| void * | listDequeue (void ***list) |
| list Dequeue return first element from list and remove last element from the list More... | |
| void | listFree (void **list) |
| list Free More... | |
| void | listFreeManyF (void **paramType,...) |
| list free many More... | |
| size_t | listLength (void **list) |
| list Length return number of elements until the first NULL element More... | |
| void * | listGet (void **list, int64_t index) |
| list Get More... | |
| void ** | listSet (void **list, int64_t index, void *s) |
| list Set More... | |
| void ** | listDup (void **list) |
| list Duplicate More... | |
| void ** | listReverse (void **list) |
| list Reverse create index list and reverse list, the last element is the first element of the new list More... | |
| void ** | iListReverse (void ***list) |
| list Reverse reverse list, the last element is the first element of the list More... | |
| void ** | listCatF (void **paramType,...) |
| list Cat More... | |
| void ** | listAppend (void ***list1, void **list2) |
| list Append More... | |
| void ** | listAdd (void **list1, void **list2) |
| list Add add list1 and list2 in a new list More... | |
| void ** | listSlice (void **list, int64_t start, int64_t end) |
| list Slice More... | |
| void ** | iListSlice (void ***list, int64_t start, int64_t end) |
| list Slice return list with elements from start and end in list negative indexes are allowed More... | |
| void ** | listInsert (void **list, int64_t index, void **toInsert) |
| list Insert More... | |
| void ** | iListInsert (void ***list, int64_t index, void **toInsert) |
| list Insert More... | |
| void ** | listDel (void **list, int64_t start, int64_t end) |
| list Delete return new list without elements from start and end in list negative indexes are allowed More... | |
| void ** | iListDel (void ***list, int64_t start, int64_t end) |
| list Delete return list without elements from start and end in list negative indexes are allowed More... | |
| int | ringInit (void *ring, int maxCount) |
| list Sort duplicate list and sort More... | |
| int | ringEmpty (void *ring) |
| empty ring Allocated buffers in the list must be freed before running staticArrayEmpty More... | |
| int | ringIsEmpty (void *ring) |
| 1 when empty 0 not empty -1 error More... | |
| int | ringIsFull (void *ring) |
| 1 when full 0 not full -1 error More... | |
| ssize_t | ringCount (void *ring) |
| return elements count More... | |
| i64 | ringPush (void *ring) |
| push element to ring (only increases last, use ringSend) use ringLast to access the element More... | |
| int | ringPop (void *ring) |
| pop element from ring (only decreases last) More... | |
| i64 | ringPrepend (void *ring) |
| prepend element to ring (only decreases head) use ringFirst to access the element More... | |
| int | ringDequeue (void *ring) |
| dequeue element from ring (only increases head, use ringRecv) More... | |
| bool | fiberAdd (void *ctx, int thisSlot, fiberFT func) |
| add new fiber More... | |
| bool | fiberPrepend (void *ctx, int thisSlot, fiberFT func) |
| add new fiber and start immediately after next yield More... | |
| void | scheduler (void) |
| Schedule fibers. More... | |
| uint64_t | getMonotonicTime (void) |
| end bitfield More... | |
| int | nanoSleepF (uint64_t time) |
| nanosleep More... | |
| void | initLibsheepyF (const char *progPath, initLibsheepyObjectP initF) |
| initialize libsheepy (optional, for debug) More... | |
| char ** | btrace (void) |
| generate backtrace the program has to be linked the -rdynamic option for btrace to work btrace can backtrace 50 functions at most. More... | |
Variables | |
| const bool | TRUE = true |
| type bool true (glibc true is not bool), for use in generics More... | |
| const bool | FALSE = false |
| type bool false (glibc true is not bool), for use in generics More... | |
| bool | btraceCfg = true |
| backtrace in error messages is enabled by default More... | |
| jmp_buf | tryJumpBuffers [maxTryThrowCount] |
| setjmp buffers for try/throw,throwV macros More... | |
| uint64_t | logMask = 0xFFFFFFFFFFFFFFFF |
| variable to control which group logs to show, all logs are enabled by default (0xFFFFFFFFFFFFFFFF) More... | |
| const uint8_t | codeSzUTF8 [256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1} |
| fibersT | fibers |
| fibers holds the necessary information to schedule fibers More... | |
This file has basic file, random, string, list functions.
There are 2 types of lists: char** and void**
The *S (not i*S) functions duplicate the parameters and results. You must free the result if result is non-NULL and free the parameters
The functions starting with i*S are in place functions.
In Place functions: iList*S and i*S The iList*S and i*S functions modify the input buffers The input buffers must be allocated with malloc/calloc Returns are pointers to original buffers
For more information, the documentation is located at http://spartatek.se/libsheepy/
Definition in file libsheepy.c.
| #define internal static |
Definition at line 44 of file libsheepy.c.
Definition at line 285 of file libsheepy.c.
Definition at line 291 of file libsheepy.c.
Definition at line 296 of file libsheepy.c.
| #define icReplaceS_max | ( | s, | |
| olds, | |||
| news | |||
| ) | icReplaceS(s,olds,news, 0) |
Definition at line 303 of file libsheepy.c.
| #define iicReplaceS_max | ( | s, | |
| olds, | |||
| news | |||
| ) | iicReplaceS(s,olds,news, 0) |
Definition at line 308 of file libsheepy.c.
| #define bicReplaceS_max | ( | s, | |
| olds, | |||
| news | |||
| ) | bicReplaceS(s,olds,news, 0) |
Definition at line 313 of file libsheepy.c.
| #define icReplaceUTF8_max | ( | s, | |
| olds, | |||
| news | |||
| ) | icReplaceUTF8(s,olds,news, 0) |
Definition at line 517 of file libsheepy.c.
| #define iicReplaceUTF8_max | ( | s, | |
| olds, | |||
| news | |||
| ) | iicReplaceUTF8(s,olds,news, 0) |
Definition at line 521 of file libsheepy.c.
| #define bicReplaceUTF8_max | ( | s, | |
| olds, | |||
| news | |||
| ) | bicReplaceUTF8(s,olds,news, 0) |
Definition at line 525 of file libsheepy.c.
| #define MALLOC malloc |
Definition at line 853 of file libsheepy.c.
| #define REALLOC realloc |
Definition at line 854 of file libsheepy.c.
| #define __libsheepy 1 |
Definition at line 859 of file libsheepy.c.
| #define MAX_MSG_LEN 10240 |
print logging levels logs messages to all log file
in LOG_VERBOSE mode, logs loglevel, filename, function name, time, line number and msg in LOG_CONCISE mode, logs loglevel and msg
the maximum message length is 10240
Definition at line 1209 of file libsheepy.c.
| #define TERMRGB "\x1b[38;2;" |
printf RGB Colors
k and K type specifier to GNU printf for RBG colors
Example: printf("%k%KRGB color" RST, 0x99EEFF, 0x666666);
Definition at line 1426 of file libsheepy.c.
| #define BGTERMRGB "\x1b[48;2;" |
Definition at line 1427 of file libsheepy.c.
| #define startMax 20 |
Definition at line 6232 of file libsheepy.c.
| #define runeMax 0x10FFFF |
maximum rune value
Definition at line 16283 of file libsheepy.c.
| #define UTFSEQ | ( | x | ) |
code point length, 0 when invalid code point, x is first byte in code point
Definition at line 16286 of file libsheepy.c.
| #define BADRUNE | ( | x | ) |
Definition at line 16295 of file libsheepy.c.
| #define UNICODE_LAST_CHAR_PART1 0x2FAFF |
Definition at line 16300 of file libsheepy.c.
| #define UNICODE_LAST_PAGE_PART1 762 |
Definition at line 16301 of file libsheepy.c.
| #define UNICODE_MAX_TABLE_INDEX 10000 |
Definition at line 16302 of file libsheepy.c.
| #define UNICODE_NOT_PRESENT_OFFSET 65535 |
Definition at line 16303 of file libsheepy.c.
| #define ATTR_TABLE | ( | Page | ) |
Definition at line 22236 of file libsheepy.c.
| #define ATTTABLE | ( | Page, | |
| Char | |||
| ) | ((ATTR_TABLE(Page) == UNICODE_MAX_TABLE_INDEX) ? 0 : (attr_data[ATTR_TABLE(Page)][Char])) |
Definition at line 22240 of file libsheepy.c.
| #define TTYPE_PART1 | ( | Page, | |
| Char | |||
| ) |
Definition at line 22243 of file libsheepy.c.
| #define TTYPE_PART2 | ( | Page, | |
| Char | |||
| ) |
Definition at line 22248 of file libsheepy.c.
| #define RUNETYPE | ( | rn | ) |
Definition at line 22253 of file libsheepy.c.
| #define IS | ( | Type, | |
| Class | |||
| ) | (((uint32_t)1 << (Type)) & (Class)) |
Definition at line 22260 of file libsheepy.c.
| #define OR | ( | Type, | |
| Rest | |||
| ) | (((uint32_t)1 << (Type)) | (Rest)) |
Definition at line 22261 of file libsheepy.c.
| #define ISMARK | ( | Type | ) |
Definition at line 22263 of file libsheepy.c.
| #define ISALPHA | ( | Type | ) |
Definition at line 22268 of file libsheepy.c.
| #define RUNE_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */ |
Definition at line 22275 of file libsheepy.c.
| #define CC_PART1 | ( | Page, | |
| Char | |||
| ) |
Definition at line 22277 of file libsheepy.c.
| #define CC_PART2 | ( | Page, | |
| Char | |||
| ) |
Definition at line 22282 of file libsheepy.c.
| #define COMBINING_CLASS | ( | Char | ) |
Definition at line 22287 of file libsheepy.c.
| #define SBase 0xAC00 |
Definition at line 47697 of file libsheepy.c.
| #define LBase 0x1100 |
Definition at line 47698 of file libsheepy.c.
| #define VBase 0x1161 |
Definition at line 47699 of file libsheepy.c.
| #define TBase 0x11A7 |
Definition at line 47700 of file libsheepy.c.
| #define LCount 19 |
Definition at line 47701 of file libsheepy.c.
| #define VCount 21 |
Definition at line 47702 of file libsheepy.c.
| #define TCount 28 |
Definition at line 47703 of file libsheepy.c.
Definition at line 47704 of file libsheepy.c.
Definition at line 47705 of file libsheepy.c.
| typedef uint64_t(* randomWordFt) (void) |
Definition at line 5861 of file libsheepy.c.
| enum localeType |
| Enumerator | |
|---|---|
| LOCALE_NORMAL | |
| LOCALE_TURKIC | |
| LOCALE_LITHUANIAN | |
Definition at line 42 of file libsheepy.c.
| enum unicodeType |
Unicode types: UNICODE_CONTROL: General category "Other, Control" (Cc) UNICODE_FORMAT: General category "Other, Format" (Cf) UNICODE_UNASSIGNED: General category "Other, Not Assigned" (Cn) UNICODE_PRIVATE_USE: General category "Other, Private Use" (Co) UNICODE_SURROGATE: General category "Other, Surrogate" (Cs) UNICODE_LOWERCASE_LETTER: General category "Letter, Lowercase" (Ll) UNICODE_MODIFIER_LETTER: General category "Letter, Modifier" (Lm) UNICODE_OTHER_LETTER: General category "Letter, Other" (Lo) UNICODE_TITLECASE_LETTER: General category "Letter, Titlecase" (Lt) UNICODE_UPPERCASE_LETTER: General category "Letter, Uppercase" (Lu) UNICODE_SPACING_MARK: General category "Mark, Spacing" (Mc) UNICODE_ENCLOSING_MARK: General category "Mark, Enclosing" (Me) UNICODE_NON_SPACING_MARK: General category "Mark, Nonspacing" (Mn) UNICODE_DECIMAL_NUMBER: General category "Number, Decimal Digit" (Nd) UNICODE_LETTER_NUMBER: General category "Number, Letter" (Nl) UNICODE_OTHER_NUMBER: General category "Number, Other" (No) UNICODE_CONNECT_PUNCTUATION: General category "Punctuation, Connector" (Pc) UNICODE_DASH_PUNCTUATION: General category "Punctuation, Dash" (Pd) UNICODE_CLOSE_PUNCTUATION: General category "Punctuation, Close" (Pe) UNICODE_FINAL_PUNCTUATION: General category "Punctuation, Final quote" (Pf) UNICODE_INITIAL_PUNCTUATION: General category "Punctuation, Initial quote" (Pi) UNICODE_OTHER_PUNCTUATION: General category "Punctuation, Other" (Po) UNICODE_OPEN_PUNCTUATION: General category "Punctuation, Open" (Ps) UNICODE_CURRENCY_SYMBOL: General category "Symbol, Currency" (Sc) UNICODE_MODIFIER_SYMBOL: General category "Symbol, Modifier" (Sk) UNICODE_MATH_SYMBOL: General category "Symbol, Math" (Sm) UNICODE_OTHER_SYMBOL: General category "Symbol, Other" (So) UNICODE_LINE_SEPARATOR: General category "Separator, Line" (Zl) UNICODE_PARAGRAPH_SEPARATOR: General category "Separator, Paragraph" (Zp) UNICODE_SPACE_SEPARATOR: General category "Separator, Space" (Zs)
These are the possible character classifications from the Unicode specification. See Unicode Character Database.
Definition at line 16342 of file libsheepy.c.
| internal void segfault_sigaction | ( | int signal | , |
| siginfo_t * | si, | ||
| void * | arg | ||
| ) |
segmentation fault handler
prints line and file where the segfault crash occured
Definition at line 891 of file libsheepy.c.
| void cleanUpCharFree | ( | char ** | val | ) |
| void cleanUpListFree | ( | char *** | val | ) |
| void cleanUpFileFree | ( | FILE ** | val | ) |
| void cleanUpFd | ( | int * | val | ) |
Definition at line 939 of file libsheepy.c.
| uint64_t shStopwatch | ( | uint8_t | op | ) |
nanosecond stopwatch
| op | operation: 0 start, 1 get stopwatch value |
Definition at line 955 of file libsheepy.c.

| int getLogSymbols | ( | void | ) |
get current log symbols
Definition at line 996 of file libsheepy.c.
| void setLogSymbols | ( | int | mode | ) |
set log symbols
LOG_VERBOSE for words LOG_UTF8 for emojis LOG_VOID for no symbols LOG_INVALID_MODE (reset log symbols) for default log mode symbols anything else (LOG_CONCISE,...) for symbols (!*+->~)
default is default log mode symbols
Definition at line 1012 of file libsheepy.c.
| int getMaxLogLevel | ( | void | ) |
get current max log level
default is LOG_INVALID, to show all log levels -1 hides all logs
Definition at line 1028 of file libsheepy.c.
| void setMaxLogLevel | ( | int | logLevel | ) |
set max log level logs above logMaxLevel are skipped
default is LOG_INVALID, to show all log levels LOG_DISABLE hides all logs
| logLevel | from LOG_DISABLE to LOG_INVALID |
Definition at line 1043 of file libsheepy.c.
| FILE * setLogFile | ( | char * | filename | ) |
set log file the logs are appended to all log files set with this function
there is a maximum of 15 log files
Definition at line 1058 of file libsheepy.c.
| void closeLogFiles | ( | void | ) |
close logfiles opened with setLogFile
Definition at line 1081 of file libsheepy.c.
| int getLogMode | ( | void | ) |
get current log mode (verbose, concise)
Definition at line 1097 of file libsheepy.c.
| void setLogMode | ( | int | mode | ) |
set log mode LOG_VERBOSE, LOG_CONCISE, .
the default log mode is LOG_DATE
Definition at line 1107 of file libsheepy.c.


| bool getLogShortPath | ( | void | ) |
get current log long/short path value
The default value is TRUE (short paths) TRUE shows short file paths in logs FALSE shows long file paths in logs
Definition at line 1128 of file libsheepy.c.
| void setLogShortPath | ( | bool | shortPath | ) |
set log long/short file path value for VERBOSE mode
TRUE shows short file paths in logs FALSE shows long file paths in logs
the default long/short path value is TRUE
Definition at line 1141 of file libsheepy.c.
| bool getLogStdout | ( | void | ) |
get stdout state, when TRUE (default) all logs are printed to stdout
Definition at line 1149 of file libsheepy.c.
| void setLogStdout | ( | bool | state | ) |
enable/disable printing logs to stdout
TRUE: print logs to stdout FALSE: print logs to files only
Definition at line 1160 of file libsheepy.c.
| bool openProgLogFile | ( | void | ) |
log to a file named progName.log Use closeLogFiles when finished logging
Definition at line 1169 of file libsheepy.c.
| void keepAnsiColorsInLog | ( | bool | state | ) |
enable/disable ansi color codes in logs
TRUE: print colors FALSE: strip colors
Definition at line 1194 of file libsheepy.c.
| void _pLog | ( | int | loglevel, |
| const char * | file, | ||
| const char * | func, | ||
| int | line, | ||
| const char * | msg, | ||
| ... | |||
| ) |
Definition at line 1210 of file libsheepy.c.
| int print_k | ( | FILE * | stream, |
| const struct printf_info * | info, | ||
| const void *const * | args | ||
| ) |
k printf type specifier, RGB foreground, uint32_t 0x00RRGGBB
Definition at line 1433 of file libsheepy.c.
| int print_K | ( | FILE * | stream, |
| const struct printf_info * | info, | ||
| const void *const * | args | ||
| ) |
K printf type specifier, RGB background, uint32_t 0x00RRGGBB
Definition at line 1451 of file libsheepy.c.
| int print_k_arginfo | ( | const struct printf_info *info | UNUSED, |
| size_t | n, | ||
| int * | argtypes, | ||
| int * | size | ||
| ) |
procress printf argument
Definition at line 1468 of file libsheepy.c.
| int print_b | ( | FILE * | stream, |
| const struct printf_info * | info, | ||
| const void *const * | args | ||
| ) |
b printf type specifier, print bool as FALSE/TRUE
Definition at line 1480 of file libsheepy.c.
| int print_b_arginfo | ( | const struct printf_info *info | UNUSED, |
| size_t | n, | ||
| int * | argtypes, | ||
| int * | size | ||
| ) |
procress printf argument
Definition at line 1495 of file libsheepy.c.
| void finalizeLibsheepyCharAtExit | ( | void | ) |
finalize libsheepy char at exit
free internal buffers in this file:
realprogpath urandomFp software random file
Definition at line 1652 of file libsheepy.c.

| int64_t getStackLimit | ( | void | ) |
get current stack limit
Definition at line 1667 of file libsheepy.c.
| int setStackLimit | ( | int64_t | stackSize | ) |
set stack limit
| stackSize | stack size in bytes, set -1 for unlimited size |
Definition at line 1686 of file libsheepy.c.
| int enableCoreDump | ( | void | ) |
enable core dump
change core dump size to infinity to enable core dump. After the program receives a signal generating core dump, a core file is written to disk and can be open with gdb
Definition at line 1720 of file libsheepy.c.
| const char * getProgName | ( | void | ) |
| bool setProgName | ( | const char * | name | ) |
set program name
this program name showing in the logs
Definition at line 1755 of file libsheepy.c.

| void setDefaultProgName | ( | void | ) |
set default program name
this program name showing in the logs
Definition at line 1773 of file libsheepy.c.
| void freeProgName | ( | void | ) |
free ProgName if set with setProgName
Definition at line 1782 of file libsheepy.c.
| const char * getProgPath | ( | void | ) |
get program path When initLibsheepy is called before this function, it returns the given program path.
When initLibsheepy has not been called before this function, it returns the real program path.
Definition at line 1795 of file libsheepy.c.

| const char * getRealProgPath | ( | void | ) |
get real program path The first call allocates libSheepyRealProgPath, it is freed with freeRealProgPath
Definition at line 1812 of file libsheepy.c.

| void freeRealProgPath | ( | void | ) |
free real program path finalizeLibsheepy calls this function
Definition at line 1826 of file libsheepy.c.

| int systemNFreeF | ( | char * | command, |
| int | line, | ||
| const char * | thisFunc, | ||
| const char * | thisFileName | ||
| ) |
run system command and free command buffer a message is printed when an error occurs
this function is called from the systemNFree macro
| command | command to run in the shell |
Definition at line 1844 of file libsheepy.c.

| time_t getModificationTime | ( | const char * | path | ) |
get modification time for path
| path |
Definition at line 1864 of file libsheepy.c.


| int setModificationTime | ( | const char * | path, |
| time_t | mtime | ||
| ) |
set modification time for path
| path | |
| mtime | (for example, from the getModificationTime function) |
Definition at line 1890 of file libsheepy.c.


| bool isReadable | ( | const char * | path | ) |
| bool isWritable | ( | const char * | path | ) |
| bool isExecutable | ( | const char * | path | ) |
| bool equalModificationTimes | ( | const char * | path1, |
| const char * | path2 | ||
| ) |
compare modification times for path1 and path2
| path1 | |
| path2 |
Definition at line 1979 of file libsheepy.c.


| time_t getCurrentUnixTime | ( | void | ) |
get current unix time in seconds
time_t is either int32_t or int64_t
Definition at line 2001 of file libsheepy.c.
| time_t strToUnixTime | ( | const char * | date, |
| const char * | format | ||
| ) |
convert date string to unix time
| date | string |
| format | for strptime |
Definition at line 2018 of file libsheepy.c.

| char * timeToS | ( | const time_t | t | ) |
time To String convert unix time to string (ctime is not used here because it adds
at the end of the string)
| unix | time to convert |
Definition at line 2048 of file libsheepy.c.

| char * bTimeToS | ( | char * | dst, |
| const time_t | t | ||
| ) |
Definition at line 2057 of file libsheepy.c.
| char * bLTimeToS | ( | char * | dst, |
| size_t | dstSize, | ||
| const time_t | t | ||
| ) |
Definition at line 2065 of file libsheepy.c.
| char * timeToYMDS | ( | const time_t | t | ) |
time To Year-Month-Day Hour:Minute:Second String convert unix time to string
| unix | time to convert |
Definition at line 2082 of file libsheepy.c.
| char * bTimeToYMDS | ( | char * | dst, |
| const time_t | t | ||
| ) |
Definition at line 2091 of file libsheepy.c.
| char * bLTimeToYMDS | ( | char * | dst, |
| size_t | dstSize, | ||
| const time_t | t | ||
| ) |
Definition at line 2099 of file libsheepy.c.
| char * getCurrentDate | ( | void | ) |
get current date in ctime format (Wed Dec 12 11:44:08 2018)
you must free the pointer
Definition at line 2112 of file libsheepy.c.
| char * bGetCurrentDate | ( | char * | dst | ) |
Definition at line 2121 of file libsheepy.c.
| char * bLGetCurrentDate | ( | char * | dst, |
| size_t | dstSize | ||
| ) |
Definition at line 2132 of file libsheepy.c.
| char * getCurrentDateYMD | ( | void | ) |
get current date in Y-m-d H:M:S format
you must free the pointer
Definition at line 2148 of file libsheepy.c.
| char * bGetCurrentDateYMD | ( | char * | dst | ) |
Definition at line 2157 of file libsheepy.c.
| char * bLGetCurrentDateYMD | ( | char * | dst, |
| size_t | dstSize | ||
| ) |
Definition at line 2168 of file libsheepy.c.
| char * shDirname | ( | const char * | path | ) |
sheepy dirname
the returned string has to be freed
| path |
Definition at line 2191 of file libsheepy.c.


| char * bDirname | ( | char * | path | ) |
buffer dirname
the buffer size (path) must be at least 3 chars
| path |
Definition at line 2252 of file libsheepy.c.


| char * bLDirname | ( | char * | path, |
| size_t | pathSize | ||
| ) |
buffer size dirname
the buffer size (path) must be at least 3 chars
| path | |
| pathSize | path buffer size, the path strlen will be at most pathSize-1 |
Definition at line 2306 of file libsheepy.c.

| char * expandHome | ( | const char * | path | ) |
expands ~/ ($HOME) or ~USER
duplicate and expand path.
The original remains unchanged.
| path | string |
Definition at line 2443 of file libsheepy.c.


| char * iExpandHome | ( | char ** | path | ) |
expands ~/ ($HOME) or ~USER
duplicate and expand path.
| path | string (this parameter is reallocated) |
Definition at line 2638 of file libsheepy.c.


| char * bExpandHome | ( | char * | path | ) |
buffer expands ~/ ($HOME) or ~USER
expand path
| path | string |
Definition at line 2821 of file libsheepy.c.


| char * bLExpandHome | ( | char * | path, |
| size_t | pathSize | ||
| ) |
buffer size expands ~/ ($HOME) or ~USER
expand path
| path | string |
| pathSize | path buffer size, the path strlen will be at most pathSize-1 |
Definition at line 3001 of file libsheepy.c.


| char * normalizePath | ( | const char * | path | ) |
normalize path
remove unecessary /, .. and . leading / is kept leading .. is kept leading . is removed
'/../' becomes '/'
| path |
Definition at line 3057 of file libsheepy.c.


| char * iNormalizePath | ( | char ** | path | ) |
normalize path
remove unecessary /, .. and . leading / is kept leading .. is kept leading . is removed
'/../' becomes '/'
| path | (this parameter is reallocated) |
Definition at line 3155 of file libsheepy.c.


| char * bNormalizePath | ( | char * | path | ) |
buffer normalize path
remove unecessary /, .. and . leading / is kept leading .. is kept leading . is removed
'/../' becomes '/'
| path |
Definition at line 3260 of file libsheepy.c.


| char * bLNormalizePath | ( | char * | path, |
| size_t | pathSize | ||
| ) |
buffer size normalize path
path must be at least 2 chars
remove unecessary /, .. and . leading / is kept leading .. is kept leading . is removed
'/../' becomes '/'
| path | |
| pathSize | path buffer size, the path strlen will be at most pathSize-1 |
Definition at line 3367 of file libsheepy.c.

| char * relPath | ( | const char * | path, |
| const char * | start | ||
| ) |
relative path
Return a relative filepath to path either from the current directory or from an optional start directory
| path | path to convert |
| start | reference path, cwd when NULL |
Definition at line 3472 of file libsheepy.c.

| char * iRelPath | ( | char ** | path, |
| const char * | start | ||
| ) |
relative path
Return a relative filepath to path either from the current directory or from an optional start directory
| path | path to convert (this parameter is reallocated) |
| start | reference path, cwd when NULL |
Definition at line 3599 of file libsheepy.c.

| char * bRelPath | ( | char * | dest, |
| const char * | path, | ||
| const char * | start | ||
| ) |
relative path
Return a relative filepath to path either from the current directory or from an optional start directory
| path | path to convert |
| start | reference path, cwd when NULL |
Definition at line 3730 of file libsheepy.c.

| char * bLRelPath | ( | char * | dest, |
| size_t | destSize, | ||
| char * | path, | ||
| const char * | start | ||
| ) |
relative path
Return a relative filepath to path either from the current directory or from an optional start directory
| path | path to convert |
| start | reference path, cwd when NULL |
Definition at line 3860 of file libsheepy.c.

| char * getHomePath | ( | void | ) |
get home path
Definition at line 3983 of file libsheepy.c.
| char * bGetHomePath | ( | char * | path | ) |
copy home path to path
| path | buffer large enough for home path |
Definition at line 4000 of file libsheepy.c.
| char * bLGetHomePath | ( | char * | path, |
| size_t | pathSize | ||
| ) |
copy home path to path maximum pathSize
| path | buffer large enough for home path |
| pathSize | size of path |
Definition at line 4020 of file libsheepy.c.

| const char * getCHomePath | ( | void | ) |
| char * getCwd | ( | void | ) |
get current working directory
Definition at line 4054 of file libsheepy.c.

| char * bLGetCwd | ( | char * | path, |
| size_t | pathSize | ||
| ) |
Definition at line 4070 of file libsheepy.c.
| int chDir | ( | const char * | path | ) |
change directory
| path |
Definition at line 4092 of file libsheepy.c.


| bool isDir | ( | const char * | path | ) |
is directory
| path |
Definition at line 4119 of file libsheepy.c.


| char * shReadlink | ( | const char * | path | ) |
sheepy read link
read the first target in the link chain
the returned string has to be freed
| path | symbolic link path |
Definition at line 4153 of file libsheepy.c.

| char * endlink | ( | const char * | path | ) |
end link
read the link chain of a symbolic link to the end the returned string has to be freed
| path | symbolic link path |
Definition at line 4215 of file libsheepy.c.

| bool isLink | ( | const char * | path | ) |
is symbolic link
| path |
Definition at line 4293 of file libsheepy.c.


| bool fileExists | ( | const char * | filePath | ) |
detect files and directories
| filePath | path to file or directory |
Definition at line 4321 of file libsheepy.c.


| bool fileChmod | ( | const char * | filePath, |
| mode_t | mode | ||
| ) |
like chmod in stdlibc but return true/false
| filePath | path to file or directory mode: permissions |
Definition at line 4345 of file libsheepy.c.


| ssize_t fileSize | ( | const char * | filePath | ) |
get file size
| filePath | path to file |
Definition at line 4369 of file libsheepy.c.


| ssize_t fileSizeFP | ( | FILE * | fp | ) |
get file size from file pointer
| fp | file pointer |
Definition at line 4401 of file libsheepy.c.

| void * readFileToS | ( | const char * | filePath | ) |
read file to string
0 is added at the end to terminate the string
| filePath | path to file |
Definition at line 4427 of file libsheepy.c.


| void * readStreamToS | ( | FILE * | fp | ) |
read file to string
0 is added at the end to terminate the string
| fp | file pointer |
Definition at line 4482 of file libsheepy.c.


| void * bReadFileToS | ( | const char * | filePath, |
| void * | dst | ||
| ) |
buffer read file to string
0 is added at the end to terminate the string
| dst | destination buffer |
| filePath | path to file |
Definition at line 4530 of file libsheepy.c.

| void * bReadStreamToS | ( | FILE * | fp, |
| void * | dst | ||
| ) |
buffer read file to string
0 is added at the end to terminate the string
| dst | destination buffer |
| fp | file pointer |
Definition at line 4579 of file libsheepy.c.

| void * bLReadFileToS | ( | const char * | filePath, |
| void * | dst, | ||
| size_t | dstSize | ||
| ) |
buffer size read file to string
0 is added at the end to terminate the string
| filePath | path to file |
| dst | destination buffer |
| dstSize | path buffer size, the path strlen will be at most dstSize-1 |
Definition at line 4621 of file libsheepy.c.

| void * bLReadStreamToS | ( | FILE * | fp, |
| void * | dst, | ||
| size_t | dstSize | ||
| ) |
buffer size read file to string
0 is added at the end to terminate the string
| dst | destination buffer |
| fp | file pointer |
Definition at line 4678 of file libsheepy.c.

| ssize_t readFile | ( | const char * | filePath, |
| void ** | buffer | ||
| ) |
read file to buffer
The function allocates the buffer
| filePath | path to file |
| buffer | unallocated buffer |
Definition at line 4726 of file libsheepy.c.

| ssize_t bReadFile | ( | const char * | filePath, |
| void * | buffer | ||
| ) |
buffer read file to buffer
The function allocates the buffer
| filePath | path to file |
| buffer | already allocated buffer |
Definition at line 4782 of file libsheepy.c.

| ssize_t bLReadFile | ( | const char * | filePath, |
| void * | buffer, | ||
| size_t | dstSize | ||
| ) |
buffer size read file to buffer
The function allocates the buffer
| filePath | path to file |
| buffer | already allocated buffer |
| dstSize | path buffer size |
Definition at line 4832 of file libsheepy.c.

| int writeFileS | ( | const char * | filePath, |
| const char * | string | ||
| ) |
write string to file
| filePath | path to file string |
Definition at line 4883 of file libsheepy.c.


| int writeFile | ( | const char * | filePath, |
| void * | buffer, | ||
| size_t | len | ||
| ) |
write buffer to file
| filePath | path to file buffer len buffer size in bytes |
Definition at line 4925 of file libsheepy.c.

| int writeStreamS | ( | FILE * | fp, |
| const char * | string | ||
| ) |
write string to file
| fp | file pointer string |
Definition at line 4963 of file libsheepy.c.

| int writeLStream | ( | FILE * | fp, |
| void * | buffer, | ||
| size_t | len | ||
| ) |
write buffer to file
| fp | file pointer buffer len buffer size in bytes |
Definition at line 4995 of file libsheepy.c.
| bool appendFileS | ( | const char * | filePath, |
| const char * | string | ||
| ) |
append string to filePath
| filePath | path to file string |
Definition at line 5023 of file libsheepy.c.


| bool appendFile | ( | const char * | filePath, |
| void * | buffer, | ||
| size_t | len | ||
| ) |
append buffer to file
| filePath | path to file buffer len buffer size in bytes |
Definition at line 5064 of file libsheepy.c.

| char ** walkDir | ( | const char * | dirPath | ) |
list all files in a directory recursively and sort the list
directories are not listed
| dirPath | path to directory |
Definition at line 5103 of file libsheepy.c.

| internal void walkADir | ( | const char * | dirPath, |
| char *** | list | ||
| ) |
Definition at line 5118 of file libsheepy.c.


| char ** walkDirDir | ( | const char * | dirPath | ) |
list all directories in a directory recursively and sort the list
files are not listed
| dirPath | path to directory |
Definition at line 5166 of file libsheepy.c.

| internal void walkADirDir | ( | const char * | dirPath, |
| char *** | list | ||
| ) |
Definition at line 5181 of file libsheepy.c.


| char ** readDir | ( | const char * | dirPath | ) |
list files in a directory and sort the list
directories are not listed
| dirPath | path to directory |
Definition at line 5227 of file libsheepy.c.

| char ** readDirDir | ( | const char * | dirPath | ) |
list directories in a directory and sort the list
files are not listed
| dirPath | path to directory |
Definition at line 5279 of file libsheepy.c.

| char ** walkDirAll | ( | const char * | dirPath | ) |
list all files and directories in a directory recursively and sort the list
directories are listed
| dirPath | path to directory |
Definition at line 5331 of file libsheepy.c.

| internal void walkADirAll | ( | const char * | dirPath, |
| char *** | list | ||
| ) |
Definition at line 5346 of file libsheepy.c.


| char ** readDirAll | ( | const char * | dirPath | ) |
list files in a directory and sort the list
directories are listed
| dirPath | path to directory |
Definition at line 5392 of file libsheepy.c.

| mode_t getUmask | ( | void | ) |
| mode_t getCurrentPermissions | ( | void | ) |
get current permissions for creating directories
Definition at line 5443 of file libsheepy.c.


| int mkdirParents | ( | const char * | path | ) |
recursive mkdir
| path |
Definition at line 5457 of file libsheepy.c.


| int rmAll | ( | const char * | path | ) |
remove all delete recursively files and directories
| path |
Definition at line 5510 of file libsheepy.c.


| int rmADir | ( | const char * | dirPath | ) |
Definition at line 5527 of file libsheepy.c.


| int copy | ( | const char * | src, |
| const char * | dst | ||
| ) |
copy files recursively This function is equivalent to 'cp -Ra' without wildcards and circular link detection
when src ends with /, the files in src are copied to dst when src does't end with /, the last directory name in src is copied to dst The permissions are copied to the destination
| src | source path dst destination path |
Definition at line 5590 of file libsheepy.c.


| int copyFile | ( | const char * | src, |
| const char * | dst | ||
| ) |
Definition at line 5662 of file libsheepy.c.


| int copyADir | ( | const char * | src, |
| const char * | dst, | ||
| const char * | path | ||
| ) |
Definition at line 5712 of file libsheepy.c.


| int shRename | ( | const char * | src, |
| const char * | dst | ||
| ) |
rename file
| src | source path dst destination path |
Definition at line 5808 of file libsheepy.c.


| int shMove | ( | const char * | src, |
| const char * | dst | ||
| ) |
move files recursively
copy and then delete source
called shMove because it conflicts with move in ncurses
| src | source path |
| dst | destination path |
Definition at line 5845 of file libsheepy.c.


| void setSoftwareRandom | ( | void | ) |
use software random numbers works on all cpu architectures the default random function is software
Definition at line 5869 of file libsheepy.c.
| void setHardwareRandom | ( | void | ) |
use cpu hardware random number generator
Definition at line 5878 of file libsheepy.c.
| int randomUrandomOpen | ( | void | ) |
open /dev/urandom in libsheepy
call this function before calling randomWord and randomChoice when random are not needed anymore call randomUrandomClose
Definition at line 5895 of file libsheepy.c.
| randomUrandomClose | ( | void | ) |
close /dev/urandom in libsheepy call this function when random are not needed anymore
Definition at line 5916 of file libsheepy.c.
| uint64_t randomWord | ( | void | ) |
return random 64 bit unsigned integer call randomUrandomOpen before this calling function
Definition at line 5933 of file libsheepy.c.
| uint64_t randomWordFromHW | ( | void | ) |
return random 64 bit unsigned integer from the cpu when the cpu doesn't have the random generator instruction, the program stops with 'Illegal instruction'
Definition at line 5959 of file libsheepy.c.
| uint64_t randomChoice | ( | uint64_t | range | ) |
return a random value between 0 and range 0<=value<range call randomUrandomOpen before this calling function
| range | - must be > 0 |
Definition at line 5991 of file libsheepy.c.
| char * randomS | ( | uint64_t | length | ) |
random string
allocate and generate a random string in charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-,"
| string | length |
Definition at line 6020 of file libsheepy.c.

| char * bRandomS | ( | char * | dst, |
| size_t | dstSize | ||
| ) |
buffer random string
allocate and generate a random string in charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-,"
| dst | destination buffer |
| dstSize | destination buffer size, must be at least 2, to have at least 1 random char in the string |
Definition at line 6080 of file libsheepy.c.
| char * randomAlphaNumS | ( | uint64_t | length | ) |
random alpha numerical string
allocate and generate a random string in charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
| string | length |
Definition at line 6132 of file libsheepy.c.

| char * bRandomAlphaNumS | ( | char * | dst, |
| size_t | dstSize | ||
| ) |
buffer random alpha numerical string
allocate and generate a random string in charset "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
| dst | destination buffer |
| dstSize | destination buffer size, must be at least 2, to have at least 1 random char in the string |
Definition at line 6192 of file libsheepy.c.
| char * readS | ( | void | ) |
read String read user input (one line) as a string
there is no size limit and the buffer expands as needed
Definition at line 6244 of file libsheepy.c.


| char * bLReadS | ( | char * | dst, |
| size_t | dstSize | ||
| ) |
buffer read String read user input (one line) as a string
| dst | destination buffer |
| dstSize | destination buffer size, must be at least 2, to have at least 1 char from the user in the string |
Definition at line 6297 of file libsheepy.c.
sheepy get pass
like getpass, read password from tty
currently used in Termux because getpass is missging
Definition at line 6333 of file libsheepy.c.


| char * readPasswordS | ( | void | ) |
read hidden password string
Definition at line 6377 of file libsheepy.c.

| bool zeroS | ( | char * | string | ) |
write zero to all bytes in string with memset, for clearing password buffers
| string |
Definition at line 6403 of file libsheepy.c.
| bool zeroBuf | ( | void * | buf, |
| size_t | len | ||
| ) |
write zero to all bytes in buffer with memset
| buf | buffer |
| len | length |
Definition at line 6425 of file libsheepy.c.
| void * memdup | ( | const void * | buf, |
| size_t | size | ||
| ) |
memory duplicate allocate and copy buffer
| buf | buffer to duplicate |
| size | buffer size |
Definition at line 6448 of file libsheepy.c.
| void readEnter | ( | void | ) |
read Enter key wait until press the enter key
Definition at line 6468 of file libsheepy.c.
| char * readLine | ( | FILE * | fp | ) |
readLine from file stream the fist new line is converted to 0
| fp | file stream |
Definition at line 6493 of file libsheepy.c.


| void freeManySF | ( | char * | paramType, |
| ... | |||
| ) |
free Many String
free variable list of pointers freeManyS(s1, s2, ...);
Definition at line 6526 of file libsheepy.c.

| char * dupS | ( | const char * | string | ) |
duplicate string
| string |
Definition at line 6548 of file libsheepy.c.

| void shPrintfS | ( | const char * | fmt, |
| ... | |||
| ) |
sheepy Print String
same as printf when the formating string is NULL, "(null)" is printed
| format | string - can be NULL data |
Definition at line 6566 of file libsheepy.c.
| void shEPrintfS | ( | const char * | fmt, |
| ... | |||
| ) |
sheepy Error printf String print with logE
when the formating string is NULL, "(null)" is printed
| format | string like printf |
Definition at line 6589 of file libsheepy.c.


| void logNFree | ( | char * | s | ) |
log and free
| string | to print, can be NULL |
Definition at line 6613 of file libsheepy.c.


| void loghex | ( | const void * | buf, |
| size_t | len | ||
| ) |
print buffer as hexadecimal string
Definition at line 6624 of file libsheepy.c.
| char * toHexS | ( | const void * | buf, |
| size_t | len | ||
| ) |
create a string with bytes in buf converted to hex strings
| buf | buffer to convert to hexstring |
| len | buffer size in bytes |
Definition at line 6648 of file libsheepy.c.
| char * toHexSepS | ( | const void * | buf, |
| size_t | len, | ||
| const char * | separator | ||
| ) |
create a string with bytes in buf converted to hex strings separated by separator
| buf | buffer to convert to hexstring |
| len | buffer size in bytes |
| separator | separator between the hexadecimal numbers |
Definition at line 6686 of file libsheepy.c.

| char * toHexHeadSepS | ( | const void * | buf, |
| size_t | len, | ||
| const char * | head, | ||
| const char * | separator | ||
| ) |
create a string with bytes in buf converted to hex strings separated by separator and with head string in front of earch byte: HEADffSEP
| buf | buffer to convert to hexstring |
| len | buffer size in bytes |
| head | separator before each hexadecimal numbers |
| separator | separator after each hexadecimal numbers |
Definition at line 6728 of file libsheepy.c.
| char * strCpy | ( | char *restrict | dst, |
| const char *restrict | src | ||
| ) |
strCpy - copy src to dst
like strcpy with sanity checks
| dst | destination buffer |
| src | source string |
Definition at line 6771 of file libsheepy.c.
| char * strNCpy | ( | char *restrict | dst, |
| const char *restrict | src, | ||
| size_t | srcSize | ||
| ) |
strNCpy - copy src to dst
null safe version of strncpy
| dst | destination buffer |
| src | source string |
| srcSize | source buffer size |
Definition at line 6796 of file libsheepy.c.
| char * strLCpy | ( | char *restrict | dst, |
| size_t | dstSize, | ||
| const char *restrict | src | ||
| ) |
strLCpy - copy src to dst
like strncpy and the NUL char is always added at the end of the string
| dst | destination buffer |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
| src | source string |
Definition at line 6822 of file libsheepy.c.

| char * strCat | ( | char *restrict | dst, |
| const char *restrict | src | ||
| ) |
strCat - concatenate two strings
like strcat with sanity checks
| dst | destination buffer |
| src | source string |
Definition at line 6848 of file libsheepy.c.
| char * strNCat | ( | char *restrict | dst, |
| const char *restrict | src, | ||
| size_t | srcLen | ||
| ) |
strNCat - concatenate two strings
like strncat with sanity checks
| dst | destination buffer |
| src | source string |
| srcLen | max source len |
Definition at line 6872 of file libsheepy.c.
| char * strLCat | ( | char *restrict | dst, |
| size_t | dstSize, | ||
| const char *restrict | src | ||
| ) |
strLCat - concatenate two strings
like strlcat with sanity checks
| dst | destination buffer |
| src | source string |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
Definition at line 6897 of file libsheepy.c.

| char * strLNCat | ( | char *restrict | dst, |
| size_t | dstSize, | ||
| const char *restrict | src, | ||
| size_t | srcLen | ||
| ) |
strLNCat - concatenate two strings
like strlcat with sanity checks
| dst | destination buffer |
| src | source string |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
| srcLen | max source len |
Definition at line 6966 of file libsheepy.c.

| char * catSF | ( | const char * | paramType, |
| ... | |||
| ) |
cat String Function
| arbitrary | list of strings seperated by commas |
Definition at line 6998 of file libsheepy.c.

| char * iCatSF | ( | char * | dst, |
| const char * | paramType, | ||
| ... | |||
| ) |
cat and copy String Function dst has to be big enough to hold the result
| dst | result destination buffer arbitrary list of strings seperated by commas |
Definition at line 7027 of file libsheepy.c.
| char * bLCatSF | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | paramType, | ||
| ... | |||
| ) |
cat and copy String Function
| dst | result destination buffer arbitrary list of strings seperated by commas |
Definition at line 7057 of file libsheepy.c.

| char * formatS | ( | const char * | fmt, |
| ... | |||
| ) |
format string allocate and format string using asprintf
| format | string and other parameters |
Definition at line 7092 of file libsheepy.c.

| char * bFormatS | ( | char * | string, |
| const char * | fmt, | ||
| ... | |||
| ) |
format string
format and store in string: bFormatS(string, "Value %d", i);
| format | string and other parameters |
Definition at line 7117 of file libsheepy.c.
| char * bLFormatS | ( | char * | string, |
| size_t | stringSize, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
format string
format and store in string: bLFormatS(string, sizeof(string), "Value %d", i);
| format | string and other parameters |
Definition at line 7140 of file libsheepy.c.
| char * appendS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
append strings
| string1 | string string2 string to append at the end of string1 |
Definition at line 7166 of file libsheepy.c.

| char * appendCharS | ( | const char * | string1, |
| char | c | ||
| ) |
append char to string when c is 0 the result is string1
| string1 | string c char to append |
Definition at line 7209 of file libsheepy.c.

| char * appendSChar | ( | char | c, |
| const char * | string2 | ||
| ) |
append string to char
| string1 | string c char to append |
Definition at line 7245 of file libsheepy.c.

| char * iAppendS | ( | char ** | string1, |
| const char * | string2 | ||
| ) |
append strings
| string1 | string, which is reallocated. string2 string to append at the end of string1 |
Definition at line 7285 of file libsheepy.c.

| char * iAppendCharS | ( | char ** | string1, |
| char | c | ||
| ) |
append char to string
| string1 | string, which is reallocated. c char to append at the end of string1 |
Definition at line 7329 of file libsheepy.c.

| char * iAppendNFreeS | ( | char ** | string1, |
| char * | string2 | ||
| ) |
append and free strings
string2 is freed (except when there is an error)
| string1 | string, which is reallocated. string2 string to append at the end of string1 |
Definition at line 7368 of file libsheepy.c.


| char * iAppendManySF | ( | char ** | string, |
| const char * | paramType, | ||
| ... | |||
| ) |
append many strings
| string1 | string, which is reallocated. string2 string to append at the end of string1 |
Definition at line 7388 of file libsheepy.c.

| char * bAppendManySF | ( | char * | string, |
| const char * | paramType, | ||
| ... | |||
| ) |
buffer append many strings
| string1 | string string2 string to append at the end of string1 |
Definition at line 7427 of file libsheepy.c.

| char * bLAppendManySF | ( | char * | string, |
| size_t | stringSize, | ||
| const char * | paramType, | ||
| ... | |||
| ) |
buffer size append many strings
| string1 | string string2 string to append at the end of string1 |
Definition at line 7466 of file libsheepy.c.

| char * prependS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
prepend strings
| string1 | string string2 string to prepend at the beginning of string1 |
Definition at line 7511 of file libsheepy.c.

| char * prependCharS | ( | const char * | string1, |
| char | c | ||
| ) |
prepend char to string
| string1 | string c char to prepend at the beginning of string1 |
Definition at line 7526 of file libsheepy.c.

| char * prependSChar | ( | char | c, |
| const char * | string2 | ||
| ) |
prepend string to char
| c | char string2 string to prepend at the beginning of c |
Definition at line 7541 of file libsheepy.c.

| char * iPrependS | ( | char ** | string1, |
| const char * | string2 | ||
| ) |
prepend strings
| string1 | string, which is reallocated. string2 string to prepend at the beginning of string1 |
Definition at line 7557 of file libsheepy.c.


| char * iPrependCharS | ( | char ** | string1, |
| char | c | ||
| ) |
prepend char to string
| string1 | string, which is reallocated. c char to prepend at the beginning of string1 |
Definition at line 7591 of file libsheepy.c.
| char * iPrependNFreeS | ( | char ** | string1, |
| char * | string2 | ||
| ) |
prepend and free strings
string2 is freed
| string1 | string, which is reallocated. string2 string to prepend at the beginning of string1 |
Definition at line 7634 of file libsheepy.c.

| char * bPrependS | ( | char * | string1, |
| const char * | string2 | ||
| ) |
buffer prepend strings
| string1 | string string2 string to prepend at the beginning of string1 |
Definition at line 7655 of file libsheepy.c.


| char * bLPrependS | ( | char * | string1, |
| size_t | string1Size, | ||
| const char * | string2 | ||
| ) |
buffer prepend strings
| string1 | string string2 string to prepend at the beginning of string1 |
Definition at line 7687 of file libsheepy.c.


| char * replaceS | ( | const char * | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
replace String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 7731 of file libsheepy.c.


| char * replaceCharSS | ( | const char * | s, |
| char | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
| char * replaceSCharS | ( | const char * | s, |
| const char * | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * replaceCharCharS | ( | const char * | s, |
| char | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| size_t replaceSLen | ( | const char * | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
replaceSLen returns the length of the resulting string
Definition at line 7827 of file libsheepy.c.

| char * iReplaceS | ( | char ** | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string (that is allocated with malloc) olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 7892 of file libsheepy.c.


| char * iReplaceCharSS | ( | char ** | s, |
| char | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
| char * iReplaceSCharS | ( | char ** | s, |
| const char * | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * iReplaceCharCharS | ( | char ** | s, |
| char | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * bReplaceS | ( | char * | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
buffer replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8004 of file libsheepy.c.


| char * bLReplaceS | ( | char * | s, |
| size_t | sSize, | ||
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
buffer size replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8097 of file libsheepy.c.


| char * replaceManySF | ( | const char * | paramType, |
| ... | |||
| ) |
replace Many Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result
Example: r = replaceManyS("asd", "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| s | string olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8202 of file libsheepy.c.

| char * iReplaceManySF | ( | char ** | s, |
| char * | paramType, | ||
| ... | |||
| ) |
replace Many Strings the olds string is replaced with the news string max times in the result
Example: iReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | (this parameter is reallocated) olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8263 of file libsheepy.c.

| char * bReplaceManySF | ( | char * | s, |
| char * | paramType, | ||
| ... | |||
| ) |
buffer replace Many Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8317 of file libsheepy.c.

| char * bLReplaceManySF | ( | char * | s, |
| size_t | sSize, | ||
| char * | paramType, | ||
| ... | |||
| ) |
buffer size replace Many Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8371 of file libsheepy.c.

| char * icReplaceS | ( | const char * | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
ignore case Replace String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8429 of file libsheepy.c.


| char * icReplaceCharSS | ( | const char * | s, |
| char | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
| char * icReplaceSCharS | ( | const char * | s, |
| const char * | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * icReplaceCharCharS | ( | const char * | s, |
| char | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * iicReplaceS | ( | char ** | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
in place ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string (this parameter is reallocated) olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8537 of file libsheepy.c.


| char * iicReplaceCharSS | ( | char ** | s, |
| char | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
| char * iicReplaceSCharS | ( | char ** | s, |
| const char * | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * iicReplaceCharCharS | ( | char ** | s, |
| char | olds, | ||
| char | news, | ||
| size_t | max | ||
| ) |
| char * bicReplaceS | ( | char * | s, |
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
buffer ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8649 of file libsheepy.c.


| char * bLicReplaceS | ( | char * | s, |
| size_t | sSize, | ||
| const char * | olds, | ||
| const char * | news, | ||
| size_t | max | ||
| ) |
buffer size ignore case replace String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string olds: old string to be replaced in s news: new string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 8742 of file libsheepy.c.


| char * icReplaceManySF | ( | const char * | paramType, |
| ... | |||
| ) |
ignore case replace Many Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result
Example: r = icReplaceManyS("asd", "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| s | string olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8847 of file libsheepy.c.

| char * iicReplaceManySF | ( | char ** | s, |
| char * | paramType, | ||
| ... | |||
| ) |
in place ignore case replace Many Strings the olds string is replaced with the news string max times in the result
Example: iicReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | (this parameter is reallocated) olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8908 of file libsheepy.c.

| char * bicReplaceManySF | ( | char * | s, |
| char * | paramType, | ||
| ... | |||
| ) |
buffer ignore case replace Many Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 8962 of file libsheepy.c.

| char * bLicReplaceManySF | ( | char * | s, |
| size_t | sSize, | ||
| char * | paramType, | ||
| ... | |||
| ) |
buffer size ignore case replace Many Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyS(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | olds: old string to be replaced in s news: new string replacing olds in s ... |
Definition at line 9016 of file libsheepy.c.

| bool eqS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
string Equal compare string1 to string2
| 2 | strings |
Definition at line 9067 of file libsheepy.c.

| bool eqCharS | ( | char | c, |
| const char * | string2 | ||
| ) |
Definition at line 9076 of file libsheepy.c.
| bool eqSChar | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9086 of file libsheepy.c.
| bool eqIS | ( | const char * | string1, |
| const char * | string2, | ||
| int64_t | index | ||
| ) |
string Index Equal compare string1 at index to string2 when string2 is empty, the result is false
| 2 | strings |
Definition at line 9107 of file libsheepy.c.

| bool eqICharS | ( | const char * | string1, |
| char | c, | ||
| int64_t | index | ||
| ) |
Definition at line 9142 of file libsheepy.c.


| bool startsWithS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
starts With String compare start of string1 with string2
| 2 | strings |
Definition at line 9158 of file libsheepy.c.

| bool startsWithCharS | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9167 of file libsheepy.c.
| bool endsWithS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ends With String compare end of string1 with string2
| 2 | strings |
Definition at line 9185 of file libsheepy.c.

| bool endsWithCharS | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9198 of file libsheepy.c.
| ssize_t countS | ( | const char * | s, |
| const char * | needle | ||
| ) |
count String count number of (non-overlapping) occurrences of a substring
Example: assert(countS("aaa aaa", "a") == 6); assert(countS("aaa aaa", "ab") == 0); assert(countS("aaa aaa", "aa") == 2);
| 2 | strings |
Definition at line 9230 of file libsheepy.c.
| ssize_t countCharS | ( | const char * | s, |
| char | c | ||
| ) |
Definition at line 9254 of file libsheepy.c.
| bool icEqS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case string Equal compare string1 to string2
| 2 | strings |
Definition at line 9283 of file libsheepy.c.

| bool icEqCharS | ( | char | c, |
| const char * | string2 | ||
| ) |
Definition at line 9292 of file libsheepy.c.
| bool icEqSChar | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9302 of file libsheepy.c.
| bool icEqIS | ( | const char * | string1, |
| const char * | string2, | ||
| int64_t | index | ||
| ) |
ignore case string Index Equal compare string1 at index to string2 when string2 is empty, the result is false
| 2 | strings |
Definition at line 9323 of file libsheepy.c.

| bool icEqICharS | ( | const char * | string1, |
| char | c, | ||
| int64_t | index | ||
| ) |
| bool icStartsWithS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case starts With String compare start of string1 with string2
| 2 | strings |
Definition at line 9374 of file libsheepy.c.
| bool icStartsWithCharS | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9383 of file libsheepy.c.
| bool icEndsWithS | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case ends With String compare end of string1 with string2
| 2 | strings |
Definition at line 9401 of file libsheepy.c.
| bool icEndsWithCharS | ( | const char * | string1, |
| char | c | ||
| ) |
Definition at line 9414 of file libsheepy.c.
| ssize_t icCountS | ( | const char * | s, |
| const char * | needle | ||
| ) |
ignore case count String count number of (non-overlapping) occurrences of a substring
Example: assert(countS("aaa aaa", "a") == 6); assert(countS("aaa aaa", "ab") == 0); assert(countS("aaa aaa", "aa") == 2);
| 2 | strings |
Definition at line 9446 of file libsheepy.c.
| ssize_t icCountCharS | ( | const char * | s, |
| char | c | ||
| ) |
Definition at line 9470 of file libsheepy.c.
| bool hasCtrlChar | ( | const char * | string | ) |
has control char
Definition at line 9497 of file libsheepy.c.
| char * stripCtrlS | ( | const char * | string | ) |
remove terminal control char from string
| string |
Definition at line 9521 of file libsheepy.c.
| char * iStripCtrlS | ( | char ** | string | ) |
remove terminal control char from string
| string | pointer to a string |
Definition at line 9553 of file libsheepy.c.
| char * bStripCtrlS | ( | char * | string | ) |
remove terminal control char from string
| string |
Definition at line 9581 of file libsheepy.c.
| char * stripColorsS | ( | const char * | string | ) |
remove ansi colors from string
| string |
Definition at line 9609 of file libsheepy.c.
| char * iStripColorsS | ( | char ** | string | ) |
remove ansi colors from string
| string | pointer to a string |
Definition at line 9690 of file libsheepy.c.
| char * bStripColorsS | ( | char * | string | ) |
remove terminal control char from string
| string |
Definition at line 9768 of file libsheepy.c.
| char * quoteS | ( | const char * | s, |
| char | delim | ||
| ) |
add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 9850 of file libsheepy.c.
| char * bQuoteS | ( | char * | dest, |
| const char * | s, | ||
| char | delim | ||
| ) |
add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string
| dest | destination buffer, it should be big enough |
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 9914 of file libsheepy.c.
| char * bLQuoteS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | s, | ||
| char | delim | ||
| ) |
add backslash '\' before delim('\'' or '"') and backslash the backslashes in the result avoid splitting the string when it is in a source file or a json string
| dest | destination buffer |
| destSize | destination buffer size |
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 9959 of file libsheepy.c.
| size_t quoteLenS | ( | const char * | s, |
| char | delim | ||
| ) |
return the length of the escaped string (without the terminating \0)
Definition at line 10007 of file libsheepy.c.
| char * escapeS | ( | const char * | s, |
| char | delim | ||
| ) |
escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 10045 of file libsheepy.c.

| char * bEscapeS | ( | char * | dest, |
| const char * | s, | ||
| char | delim | ||
| ) |
escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct
| dest | destination buffer |
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 10134 of file libsheepy.c.
| char * bLEscapeS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | s, | ||
| char | delim | ||
| ) |
escape string according the json specification (RFC 8259) if there is in the string, the backslash is escaped and it will be parsed as the string '' be the json parsers the unicode characters should be converted to UTF8 codepoints instead of using the result can be included in a json string and the parsing will be correct
| dest | destination buffer |
| destSize | destination buffer size |
| s | string to escape |
| delim | string delimiter ' or " |
Definition at line 10205 of file libsheepy.c.
| size_t escapeLenS | ( | const char * | s, |
| char | delim | ||
| ) |
return the length of the escaped string (without the terminating \0)
Definition at line 10276 of file libsheepy.c.
| char nibbleToHex | ( | u8 | n | ) |
convert number between 0 and 15 to hexadecimal character '0' to 'F'
Definition at line 10301 of file libsheepy.c.

| char * cEscapeS | ( | const char * | S | ) |
escape string to become a valid C source string control characters, backslash and double quotes are escaped.
control characters without an escaped representation () are represented as hexidecimal literal '' the result can be included in C source code and the parsing will be correct
| S | string to escape |
Definition at line 10328 of file libsheepy.c.

| char * bCEscapeS | ( | char * | dest, |
| const char * | S | ||
| ) |
escape string to become a valid C source string control characters, backslash and double quotes are escaped.
control characters without an escaped representation () are represented as hexidecimal literal '' the result can be included in C source code and the parsing will be correct
| dest | destination buffer |
| S | string to escape |
Definition at line 10459 of file libsheepy.c.

| char * bLCEscapeS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | S | ||
| ) |
escape string to become a valid C source string control characters, backslash and double quotes are escaped.
control characters without an escaped representation () are represented as hexidecimal literal '' the result can be included in C source code and the parsing will be correct
| dest | destination buffer |
| destSize | destination buffer size |
| S | string to escape |
Definition at line 10549 of file libsheepy.c.

| size_t cEscapeLenS | ( | const char * | s | ) |
return the length of the escaped string (without the terminating \0)
Definition at line 10693 of file libsheepy.c.
| bool isNumber | ( | const char * | string | ) |
is Number (integer or float) String
1, -12 1e+4, -1.44E-1
| string |
Definition at line 10749 of file libsheepy.c.

| bool isInt | ( | const char * | string | ) |
is Integer String
| string |
Definition at line 10811 of file libsheepy.c.

| int64_t parseInt | ( | const char * | string | ) |
convert string to decimal integer
| string |
Definition at line 10846 of file libsheepy.c.


| int64_t parseIntChar | ( | char | c | ) |
Definition at line 10863 of file libsheepy.c.
| int64_t parseI64 | ( | const char * | string | ) |
convert string to decimal integer
| string |
Definition at line 10880 of file libsheepy.c.

| int64_t parseI64Char | ( | char | c | ) |
Definition at line 10897 of file libsheepy.c.
| double parseDouble | ( | const char * | string | ) |
convert string to double
| string |
Definition at line 10914 of file libsheepy.c.

| double parseDoubleChar | ( | char | c | ) |
Definition at line 10927 of file libsheepy.c.
| uint64_t parseHex | ( | const char * | string | ) |
parse hexadecimal number in a string
| string | hexadecimal string starting with 0x |
Definition at line 10944 of file libsheepy.c.


| char * intToS | ( | int64_t | n | ) |
int To String
convert int to string
| int64 | number |
Definition at line 10970 of file libsheepy.c.

| char * bIntToS | ( | char * | s, |
| int64_t | n | ||
| ) |
buffer int To String
convert int to string
| int64 | number |
Definition at line 10989 of file libsheepy.c.
| char * doubleToS | ( | double | n | ) |
double To String
convert int to string
| double | number |
Definition at line 11008 of file libsheepy.c.

| char * bDoubleToS | ( | char * | s, |
| double | n | ||
| ) |
buffer double To String
convert int to string
| double | number |
Definition at line 11027 of file libsheepy.c.
| size_t lenS | ( | const char * | string | ) |
length string
return strlen when possible
| string |
Definition at line 11047 of file libsheepy.c.

| size_t sizeS | ( | const char * | string | ) |
string buffer size
return strlen+1 when possible
| string |
Definition at line 11066 of file libsheepy.c.
| char * upperS | ( | const char * | string | ) |
upper case String duplicate string
| string |
Definition at line 11083 of file libsheepy.c.
| char * iUpperS | ( | char ** | string | ) |
upper case String
| string |
Definition at line 11114 of file libsheepy.c.
| char * bUpperS | ( | char * | string | ) |
buffer upper case String
| string |
Definition at line 11139 of file libsheepy.c.
| char * lowerS | ( | const char * | string | ) |
lower case String duplicate string
| string |
Definition at line 11164 of file libsheepy.c.
| char * iLowerS | ( | char ** | string | ) |
lower case String
| string |
Definition at line 11195 of file libsheepy.c.

| char * bLowerS | ( | char * | string | ) |
buffer lower case String
| string |
Definition at line 11220 of file libsheepy.c.
| char * trimS | ( | const char * | string | ) |
trim String duplicate string
| string |
Definition at line 11245 of file libsheepy.c.

| char * iTrimS | ( | char ** | string | ) |
trim String
| string | (this parameter is reallocated) |
Definition at line 11292 of file libsheepy.c.

| char * bTrimS | ( | char * | string | ) |
buffer trim String
| string |
Definition at line 11345 of file libsheepy.c.

| char * lTrimS | ( | const char * | string | ) |
left trim String duplicate string
| string |
Definition at line 11397 of file libsheepy.c.
| char * iLTrimS | ( | char ** | string | ) |
left trim String
| string | (this parameter is reallocated) |
Definition at line 11430 of file libsheepy.c.

| char * bLTrimS | ( | char * | string | ) |
buffer left trim String
| string |
Definition at line 11464 of file libsheepy.c.
| char * rTrimS | ( | const char * | string | ) |
right trim String duplicate string
| string |
Definition at line 11492 of file libsheepy.c.
| char * iRTrimS | ( | char ** | string | ) |
right trim String
| string |
Definition at line 11529 of file libsheepy.c.
| char * bRTrimS | ( | char * | string | ) |
buffer right trim String
| string |
Definition at line 11559 of file libsheepy.c.
| char * uniqS | ( | const char * | string, |
| char | c | ||
| ) |
uniq String duplicate string
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11592 of file libsheepy.c.
| char * iUniqS | ( | char ** | string, |
| char | c | ||
| ) |
uniq String
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11638 of file libsheepy.c.

| char * bUniqS | ( | char * | string, |
| char | c | ||
| ) |
buffer uniq String
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11682 of file libsheepy.c.
| char * icUniqS | ( | const char * | string, |
| char | c | ||
| ) |
ignore case uniq String duplicate string
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11726 of file libsheepy.c.
| char * iicUniqS | ( | char ** | string, |
| char | c | ||
| ) |
in place ignore case uniq String
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11774 of file libsheepy.c.
| char * bicUniqS | ( | char * | string, |
| char | c | ||
| ) |
ignore case buffer uniq String
remove successive repetitions of char c
| string | c character to remove |
Definition at line 11820 of file libsheepy.c.
| char * repeatS | ( | const char * | string, |
| size_t | count | ||
| ) |
repeat string count times
| string | |
| count | number of times string is repeated |
Definition at line 11865 of file libsheepy.c.

| char * iRepeatS | ( | char ** | string, |
| size_t | count | ||
| ) |
repeat string count times
| string | (this parameter is reallocated) |
| count | number of times string is repeated |
Definition at line 11908 of file libsheepy.c.


| char * bRepeatS | ( | char * | dest, |
| const char * | string, | ||
| size_t | count | ||
| ) |
repeat string count times
| dest | buffer big enough to hold count times string |
| string | |
| count | number of times string is repeated |
Definition at line 11956 of file libsheepy.c.

| char * bLRepeatS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | count | ||
| ) |
repeat string count times
| dest | buffer big enough to hold count times string |
| destSize | dest buffer size (sizeof(dest)) |
| string | |
| count | number of times string is repeated |
Definition at line 11996 of file libsheepy.c.

| char * repeatCharS | ( | char | c, |
| size_t | count | ||
| ) |
repeat char count times
| c | char to repeat |
| count | number of times c is repeated |
Definition at line 12036 of file libsheepy.c.

| char * bRepeatCharS | ( | char * | dest, |
| char | c, | ||
| size_t | count | ||
| ) |
repeat char count times
| dest | buffer big enough to hold count times c |
| c | char to repeat |
| count | number of times c is repeated |
Definition at line 12055 of file libsheepy.c.

| char * bLRepeatCharS | ( | char * | dest, |
| size_t | destSize, | ||
| char | c, | ||
| size_t | count | ||
| ) |
repeat char count times
| dest | buffer big enough to hold count times c |
| destSize | dest buffer size (sizeof(dest)) |
| c | char to repeat |
| count | number of times c is repeated |
Definition at line 12076 of file libsheepy.c.

| ssize_t repeatLenS | ( | const char * | string, |
| size_t | count | ||
| ) |
length of string repeated count times
| string | |
| count | number of times string is repeated |
Definition at line 12093 of file libsheepy.c.
| char * ellipsisStartS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12126 of file libsheepy.c.

| char * iEllipsisStartS | ( | char ** | string, |
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12172 of file libsheepy.c.

| char * bEllipsisStartS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12217 of file libsheepy.c.

| char * bLEllipsisStartS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12265 of file libsheepy.c.

| char * ellipsisStartCharS | ( | const char * | string, |
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12319 of file libsheepy.c.

| char * iEllipsisStartCharS | ( | char ** | string, |
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12366 of file libsheepy.c.

| char * bEllipsisStartCharS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12413 of file libsheepy.c.

| char * bLEllipsisStartCharS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis start string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the right and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12463 of file libsheepy.c.

| ssize_t ellipsisLenS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
length of string after ellipsis
| string |
Definition at line 12511 of file libsheepy.c.
| char * ellipsisEndS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12546 of file libsheepy.c.

| char * iEllipsisEndS | ( | char ** | string, |
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12595 of file libsheepy.c.

| char * bEllipsisEndS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12644 of file libsheepy.c.

| char * bLEllipsisEndS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | ellipsisString | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12699 of file libsheepy.c.

| char * ellipsisEndCharS | ( | const char * | string, |
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12757 of file libsheepy.c.

| char * iEllipsisEndCharS | ( | char ** | string, |
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12802 of file libsheepy.c.

| char * bEllipsisEndCharS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisChar | The char to pad the current string with. |
Definition at line 12847 of file libsheepy.c.

| char * bLEllipsisEndCharS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| char | ellipsisChar | ||
| ) |
ellipsis end string
This function pads the current string with a given string if current string is longer than target length If target length is more than current string's length, the current string is returned as is
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is truncated from the left and the pad is applied once |
| ellipsisString | The string to pad the current string with. |
Definition at line 12898 of file libsheepy.c.

| char * padStartS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad start string
This function pads the current string with a given string (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated from the right. The current string is returned as is when an empty string is supplied |
Definition at line 12955 of file libsheepy.c.

| char * iPadStartS | ( | char ** | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad start string
This function pads the current string with a given string (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated from the right. The current string is returned as is when an empty string is supplied |
Definition at line 13009 of file libsheepy.c.

| char * bPadStartS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad start string
This function pads the current string with a given string (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated from the right. The current string is returned as is when an empty string is supplied |
Definition at line 13061 of file libsheepy.c.

| char * bLPadStartS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad start string
This function pads the current string with a given string (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated from the right. The current string is returned as is when an empty string is supplied |
Definition at line 13123 of file libsheepy.c.

| char * padStartCharS | ( | const char * | string, |
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad start string
This function pads the current string with a given character (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padChar | The character to pad the current string with |
Definition at line 13183 of file libsheepy.c.

| char * iPadStartCharS | ( | char ** | string, |
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad start string
This function pads the current string with a given character (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padChar | The character to pad the current string with |
Definition at line 13231 of file libsheepy.c.

| char * bPadStartCharS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad start string
This function pads the current string with a given character (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padChar | The character to pad the current string with |
Definition at line 13277 of file libsheepy.c.

| char * bLPadStartCharS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad start string
This function pads the current string with a given character (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the start (left) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is less than the current string's length, the current string is returned as is |
| padChar | The character to pad the current string with |
Definition at line 13332 of file libsheepy.c.

| ssize_t padStartLenS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
length of string after padStart
| string |
Definition at line 13378 of file libsheepy.c.
| char * padEndS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad end string
This function pads the current string with a given string (repeated, if needed) until the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string is returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated and the left-most part will be applied. The current string is returned as is when an empty string is supplied |
Definition at line 13417 of file libsheepy.c.

| char * iPadEndS | ( | char ** | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad end string
This function pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated and the left-most part will be applied. The current string is returned as is when an empty string is supplied |
Definition at line 13473 of file libsheepy.c.

| char * bPadEndS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad end string
This function pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated and the left-most part will be applied. The current string is returned as is when an empty string is supplied |
Definition at line 13527 of file libsheepy.c.

| char * bLPadEndS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
pad end string
This function pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padString | The string to pad the current string with. If this string is too long to stay within the target length, it will be truncated and the left-most part will be applied. The current string is returned as is when an empty string is supplied |
Definition at line 13589 of file libsheepy.c.

| char * padEndCharS | ( | const char * | string, |
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad end string
This function pads the current string with a given character (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padChar | The character to pad the current string with |
Definition at line 13649 of file libsheepy.c.

| char * iPadEndCharS | ( | char ** | string, |
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad end string
This function pads the current string with a given character (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | (this parameter is reallocated) |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padChar | The character to pad the current string with |
Definition at line 13697 of file libsheepy.c.

| char * bPadEndCharS | ( | char * | dest, |
| const char * | string, | ||
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad end string
This function pads the current string with a given character (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padChar | The character to pad the current string with |
Definition at line 13745 of file libsheepy.c.

| char * bLPadEndCharS | ( | char * | dest, |
| size_t | destSize, | ||
| const char * | string, | ||
| size_t | targetLength, | ||
| char | padChar | ||
| ) |
pad end string
This function pads the current string with a given character (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string
| string | |
| targetLength | The length of the resulting string once the current string has been padded. If the value is lower than the current string's length, the current string will be returned as is |
| padChar | The string to pad the current string with |
Definition at line 13800 of file libsheepy.c.

| ssize_t padEndLenS | ( | const char * | string, |
| size_t | targetLength, | ||
| const char * | padString | ||
| ) |
length of string after padEnd
| string |
Definition at line 13847 of file libsheepy.c.
| char getS | ( | const char * | string, |
| int64_t | index | ||
| ) |
get string
get char at python index
Definition at line 13872 of file libsheepy.c.

| char * setS | ( | char * | string, |
| int64_t | index, | ||
| char | c | ||
| ) |
set string
set char at python index
Definition at line 13898 of file libsheepy.c.

| char * swapS | ( | char * | string, |
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap characters in string
| string | |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 13933 of file libsheepy.c.
| char * iSwapS | ( | char ** | string, |
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap characters in string
| string | |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 13986 of file libsheepy.c.
| char * bSwapS | ( | char * | string, |
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap characters in string
| string | |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 14034 of file libsheepy.c.
| char * bLSwapS | ( | char * | string, |
| size_t | size, | ||
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap characters in string
if string's length is more than size then size is the end of string and the indexes are computed relative to size
| string | |
| size | string buffer size |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 14087 of file libsheepy.c.
| char * sliceS | ( | const char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
slice String return new string which is the string between start and end negative indexes are allowed
(copy substring from start to end)
| string | to slice start: start index, must be in the string end: end index, must be in the string after start |
Definition at line 14148 of file libsheepy.c.

| char * iSliceS | ( | char ** | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
slice String return string which is the string between start and end negative indexes are allowed
| string | to slice (this parameter is reallocated) start: start index, must be in the string end: end index, must be in the string after start |
Definition at line 14213 of file libsheepy.c.


| char * bSliceS | ( | char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer slice String return string which is the string between start and end negative indexes are allowed
| string | to slice start: start index, must be in the string end: end index, must be in the string after start |
Definition at line 14286 of file libsheepy.c.
| char * bLSliceS | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer size slice String return string which is the string between start and end negative indexes are allowed
| string | to slice |
| stringSize | string buffer size |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 14355 of file libsheepy.c.
| char * cropS | ( | char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
Crop String return a new string with characters from start and end in string and delete characters from start to end in the original string negative indexes are allowed.
| string | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 14430 of file libsheepy.c.

| char * iCropS | ( | char ** | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
Crop String return a new string with characters from start and end in string and delete characters from start to end in the original string negative indexes are allowed.
| string | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 14501 of file libsheepy.c.

| char cropElemS | ( | char * | string, |
| int64_t | index | ||
| ) |
| char iCropElemS | ( | char ** | string, |
| int64_t | index | ||
| ) |
| char * insertS | ( | const char * | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
insert string in string at index
return new string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInsert | string |
Definition at line 14609 of file libsheepy.c.

| char * insertNFreeS | ( | const char * | string, |
| int64_t | index, | ||
| char * | toInsert | ||
| ) |
insert string in string at index and free toInsert when successful
return new string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInsert | string |
Definition at line 14678 of file libsheepy.c.

| char * iInsertS | ( | char ** | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
insert string in string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | (this parameter is reallocated) |
| index | in string |
| toInsert | string |
Definition at line 14756 of file libsheepy.c.


| char * iInsertNFreeS | ( | char ** | string, |
| int64_t | index, | ||
| char * | toInsert | ||
| ) |
insert string in string at index and free toInsert
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | (this parameter is reallocated) |
| index | in string |
| toInsert | string |
Definition at line 14835 of file libsheepy.c.

| char * bInsertS | ( | char * | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
buffer insert string in string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInsert | string |
Definition at line 14917 of file libsheepy.c.


| char * bLInsertS | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
buffer size insert string in string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInsert | string |
Definition at line 14986 of file libsheepy.c.


| char * injectS | ( | const char * | string, |
| int64_t | index, | ||
| char | toInject | ||
| ) |
inject a char in string at index
return new string with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInject | char |
Definition at line 15061 of file libsheepy.c.

| char * iInjectS | ( | char ** | string, |
| int64_t | index, | ||
| char | toInject | ||
| ) |
inject a char in string at index
return string with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | (this parameter is reallocated) |
| index | in string |
| toInject | char |
Definition at line 15131 of file libsheepy.c.

| char * bInjectS | ( | char * | string, |
| int64_t | index, | ||
| char | toInject | ||
| ) |
buffer inject a char in string at index
return string with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInject | char |
Definition at line 15208 of file libsheepy.c.

| char * bLInjectS | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | index, | ||
| char | toInject | ||
| ) |
buffer size inject a char in string at index
return string with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | |
| index | in string |
| toInject | char |
Definition at line 15274 of file libsheepy.c.

| char * delS | ( | const char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
delete string
return new string without the string between start and end negative indexes are allowed
| string | to delete |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 15345 of file libsheepy.c.
| char * iDelS | ( | char ** | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
delete string
return string without the string between start and end negative indexes are allowed
| string | to delete (this parameter is reallocated) |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 15415 of file libsheepy.c.


| char * bDelS | ( | char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer delete string
return string without the string between start and end negative indexes are allowed
| string | to delete |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 15487 of file libsheepy.c.
| char * bLDelS | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer size delete string
return string without the string between start and end negative indexes are allowed
| string | to delete |
| stringSize | string buffer size |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 15553 of file libsheepy.c.
| char * delElemS | ( | const char * | string, |
| int64_t | index | ||
| ) |
delete element/character string
return new string without the character at given index negative indexes are allowed
| string | to delete |
| index | must be in the string, -1 is the last character in the string |
Definition at line 15617 of file libsheepy.c.
| char * iDelElemS | ( | char ** | string, |
| int64_t | index | ||
| ) |
delete element/character string
return string without the character at given index negative indexes are allowed
| string | to delete (this parameter is reallocated) |
| index | must be in the string, -1 is the last character in the string |
Definition at line 15660 of file libsheepy.c.

| char * bDelElemS | ( | char * | string, |
| int64_t | index | ||
| ) |
buffer delete element/character string
return string without the character at given index negative indexes are allowed
| string | to delete |
| index | must be in the string, -1 is the last character in the string |
Definition at line 15707 of file libsheepy.c.
| char * bLDelElemS | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | index | ||
| ) |
buffer size delete element/character string
return string without the character at given index negative indexes are allowed
| string | to delete |
| stringSize | string buffer size |
| index | must be in the string, -1 is the last character in the string |
Definition at line 15748 of file libsheepy.c.
| char * findS | ( | const char * | string, |
| const char * | needle | ||
| ) |
find String
| string | |
| needle | string to find |
Definition at line 15790 of file libsheepy.c.

| char * findCharS | ( | const char * | string, |
| char | c | ||
| ) |
| ssize_t indexOfS | ( | const char * | string, |
| const char * | needle | ||
| ) |
indexOf String relative to start
| string | |
| needle | string to find |
Definition at line 15821 of file libsheepy.c.


| ssize_t indexOfCharS | ( | const char * | string, |
| char | c | ||
| ) |
Definition at line 15830 of file libsheepy.c.


| bool hasS | ( | const char * | string, |
| const char * | needle | ||
| ) |
has String
| string | |
| needle | string to find |
Definition at line 15851 of file libsheepy.c.

| bool hasCharS | ( | const char * | string, |
| char | c | ||
| ) |
Definition at line 15864 of file libsheepy.c.
| char * icFindS | ( | const char * | string, |
| const char * | needle | ||
| ) |
ignore case Find String
| string | |
| needle | string to find |
Definition at line 15888 of file libsheepy.c.

| char * icFindCharS | ( | const char * | string, |
| char | c | ||
| ) |
Definition at line 15897 of file libsheepy.c.


| ssize_t icIndexOfS | ( | const char * | string, |
| const char * | needle | ||
| ) |
ignore case indexOf String relative to start
| string | |
| needle | string to find |
Definition at line 15925 of file libsheepy.c.


| ssize_t icIndexOfCharS | ( | const char * | string, |
| char | c | ||
| ) |
Definition at line 15934 of file libsheepy.c.


| bool icHasS | ( | const char * | string, |
| const char * | needle | ||
| ) |
ignore case has String
| string | |
| needle | string to find |
Definition at line 15955 of file libsheepy.c.

| bool icHasCharS | ( | const char * | string, |
| char | c | ||
| ) |
| char * tokS | ( | char * | s, |
| const char * | delim, | ||
| char ** | saveptr | ||
| ) |
token in String
parse string into a sequence of tokens delimited by the ENTIRE DELIM string work like strtok_r from c stdlib (for strtok_r, when delim has multiple characters, each character is a delimiter)
on first call s is the string to parse, optionally initialize *saveptr to NULL on next calls, s should be NULL
| s | string to parse, the s string is modified |
| delim | string |
Definition at line 15996 of file libsheepy.c.


| char * icTokS | ( | char * | s, |
| const char * | delim, | ||
| char ** | saveptr | ||
| ) |
ignore case token in String
parse string into a sequence of tokens delimited by the ENTIRE DELIM string work like strtok_r from c stdlib (for strtok_r, when delim has multiple characters, each character is a delimiter)
on first call s is the string to parse, optionally initialize *saveptr to NULL on next calls, s should be NULL
| s | string to parse, the s string is modified |
| delim | string |
Definition at line 16038 of file libsheepy.c.


| size_t lenUTF8 | ( | const char * | s | ) |
character length of UTF-8 string
string is not checked for validity
Definition at line 16076 of file libsheepy.c.

| size_t bLLenUTF8 | ( | const char * | s, |
| size_t | maxSize | ||
| ) |
buffer character length of UTF-8 string
string is not checked for validity
bLLenUTF8 checks at most maxSize bytes
Definition at line 16095 of file libsheepy.c.

| bool isUTF8 | ( | const char * | string | ) |
is UTF-8 string
check if string is a valid UTF-8 string
| string | UTF-8 encoded string |
Definition at line 16124 of file libsheepy.c.
| bool bLIsUTF8 | ( | const char * | string, |
| size_t | stringSize | ||
| ) |
buffer length is UTF-8 string
check if string is a valid UTF-8 string
| string | UTF-8 encoded string |
Definition at line 16178 of file libsheepy.c.
| bool isCodeUTF8 | ( | const char * | code | ) |
is code point UTF8 encoded string
Check if a UTF8 code point is valid
This function checks only the first code point
| bytes | string, NUL-terminated or not, bytes can be a pointer inside a UTF8 encoded string |
Definition at line 16247 of file libsheepy.c.

| const char * nextUTF8 | ( | const char * | utf8 | ) |
next UTF-8 code point
find the next UTF-8 code point in the string
the validity of the found UTF-8 code point is not checked
nextUTF8 gives wrong result when utf8 is not on the first byte of a code point use findNextUTF8 to find next code point when utf8 is not at the start of a code point
| utf8 | UTF-8 encoded string |
Definition at line 46037 of file libsheepy.c.
| const char * bLNextUTF8 | ( | const char * | string, |
| size_t | utf8Size, | ||
| const char * | utf8 | ||
| ) |
buffer length next UTF-8 code point
find the next UTF-8 code point in the string
the validity of the found UTF-8 code point is not checked
bLNextUTF8 gives wrong result when utf8 is not on the first byte of a code point use findNextUTF8 to find next code point when utf8 is not at the start of a code point
| string | start of the UTF-8 encoded string |
| utf8 | pointer to a code point in string |
| utf8Size | string buffer size (including NUL, strlen(string) +1 when the buffer is full) |
Definition at line 46067 of file libsheepy.c.
| const char * findNextUTF8 | ( | const char * | string, |
| size_t | utf8Size, | ||
| const char * | utf8 | ||
| ) |
find next UTF-8 code point even not at the start of a code point
find the next UTF-8 code point in the string
the validity of the found UTF-8 code point is not checked
| string | start of the UTF-8 encoded string |
| utf8 | pointer in string |
| ut8Size | string buffer size (including NUL, strlen(string) +1 when the buffer is full) |
Definition at line 46099 of file libsheepy.c.
| const char * prevUTF8 | ( | const char * | utf8 | ) |
previous UTF-8 code point
find the previous UTF-8 code point in the string
the validity of the found UTF-8 code point is not checked
the behavior is undefined when utf8 is the start of the string, use instead findPrevUTF8 for safe handling
| utf8 | UTF-8 encoded string |
Definition at line 46132 of file libsheepy.c.
| const char * bPrevUTF8 | ( | const char * | string, |
| const char * | utf8 | ||
| ) |
buffer previous UTF-8 code point
find the previous UTF-8 code point in the string
the validity of the found UTF-8 code point is not checked
| string | UTF-8 encoded string |
| utf8 | pointer in UTF-8 encoded string |
Definition at line 46161 of file libsheepy.c.

| local const char * bPrevUTF8Tiny | ( | const char * | string, |
| const char * | utf8 | ||
| ) |
| local char * bPrevRWUTF8Tiny | ( | const char * | string, |
| char * | utf8 | ||
| ) |
| const char * idx2PtrUTF8 | ( | const char * | utf8, |
| int64_t | index | ||
| ) |
index to pointer UTF8 encoded string
Converts character index to pointer in utf8
| utf8 | UTF8 encoded string |
| index | character index in utf8, positive or negative. -1 is the last character in the string |
Definition at line 46207 of file libsheepy.c.


| local char * idx2PtrRWUTF8 | ( | char * | utf8, |
| int64_t | index | ||
| ) |
index to pointer UTF8 encoded string - read write utf8 string (char*)
Converts character index to pointer in utf8
| utf8 | UTF8 encoded string |
| index | character index in utf8, positive or negative. -1 is the last character in the string |
Definition at line 46263 of file libsheepy.c.


| const char * bLIdx2PtrUTF8 | ( | const char * | utf8, |
| size_t | utf8Size, | ||
| int64_t | index | ||
| ) |
Definition at line 46306 of file libsheepy.c.


| int64_t ptr2IdxUTF8 | ( | const char * | utf8, |
| const char * | pos | ||
| ) |
pointer to code point index UTF8 encoded string
Converts pointer to character index
This function works when utf8 and pos point inside code points
| utf8 | pointer to a code point in a UTF8 encoded string |
| pos | pointer to a code point in a UTF8 encoded string |
Definition at line 46371 of file libsheepy.c.

| int64_t bPtr2IdxUTF8 | ( | const char * | start, |
| const char * | utf8, | ||
| const char * | pos | ||
| ) |
buffer pointer to code point index UTF8 encoded string
Converts pointer to character index
Safe function for negative index
This function works when utf8 and pos point inside code points
| start | start of the UTF8 encoded string |
| utf8 | pointer to a code point in a UTF8 encoded string |
| pos | pointer to a code point in a UTF8 encoded string |
Definition at line 46444 of file libsheepy.c.
| int64_t bLPtr2IdxUTF8 | ( | const char * | utf8, |
| size_t | utf8Size, | ||
| const char * | pos | ||
| ) |
buffer size pointer to code point index UTF8 encoded string
Converts pointer to character index
This function works when utf8 and pos point inside code points
| utf8 | pointer to a code point in a UTF8 encoded string |
| utf8Size | utf8 buffer size including NUL |
| pos | pointer to a code point in a UTF8 encoded string |
Definition at line 46505 of file libsheepy.c.
| int64_t bLPtr2NegIdxUTF8 | ( | const char * | utf8, |
| size_t | utf8Size, | ||
| const char * | pos | ||
| ) |
buffer size pointer to negative code point index UTF8 encoded string
Converts pointer to negative character index (from the end of the string)
This function works when utf8 and pos point inside code points
| utf8 | pointer to a code point in a UTF8 encoded string |
| utf8Size | utf8 buffer size including NUL |
| pos | pointer to a code point in a UTF8 encoded string |
Definition at line 46556 of file libsheepy.c.
| char * makeValidUTF8 | ( | const char * | utf8 | ) |
make valid UTF-8 encoded string
copy utf8 to newly allocated buffer, the invalid code points are replaced with '?'
The result buffer size is the same as utf8 size
| utf8 | valid or invalid UTF-8 encoded string |
Definition at line 46593 of file libsheepy.c.

| char * bMakeValidUTF8 | ( | char * | utf8 | ) |
buffer make valid UTF-8 encoded string
replace the invalid code points with '?' in utf8
| utf8 | valid or invalid UTF-8 encoded string |
Definition at line 46635 of file libsheepy.c.


| char * nMakeValidUTF8 | ( | const char * | utf8, |
| size_t | utf8Len | ||
| ) |
length make valid UTF-8 encoded string
copy utf8 to newly allocated buffer, the invalid code points are replaced with '?'
The result buffer size is utf8Len+1
| utf8 | valid or invalid UTF-8 encoded string |
| utf8Len | utf8 length |
Definition at line 46672 of file libsheepy.c.

| char * bNMakeValidUTF8 | ( | char * | dst, |
| const char * | utf8, | ||
| size_t | utf8Len | ||
| ) |
buffer length make valid UTF-8 encoded string
copy utf8 to the dst buffer, the invalid code points are replaced with '?'
The result buffer size is utf8Len+1
| utf8 | valid or invalid UTF-8 encoded string |
| utf8Len | utf8 length |
Definition at line 46724 of file libsheepy.c.

| char * bLMakeValidUTF8 | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | utf8 | ||
| ) |
buffer destination size make valid UTF-8 encoded string
copy utf8 to the dst buffer, the invalid code points are replaced with '?'
The result buffer size is dstSize
| dst | destination buffer |
| dstSize | size of dst |
| utf8 | valid or invalid UTF-8 encoded string |
Definition at line 46773 of file libsheepy.c.

| char * bLNMakeValidUTF8 | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | utf8, | ||
| size_t | utf8Len | ||
| ) |
buffer destination size source length make valid UTF-8 encoded string
copy utf8 to the dst buffer, the invalid code points are replaced with '?'
This function always reads less than utf8Len+1 bytes in utf8 buffer The result buffer size is dstSize
| dst | destination buffer |
| dstSize | size of dst |
| utf8 | valid or invalid UTF-8 encoded string |
| utf8Len | utf8 length |
Definition at line 46825 of file libsheepy.c.

| char * strNCpyUTF8 | ( | char * | dst, |
| const char * | src, | ||
| size_t | srcLen | ||
| ) |
strNCpyUTF8 - copy src to dst with srcLen in code points
copy srcLen code points from src (UTF-8 encoded string) to dst and add one NUL character when src end is not reached (unlike strncpy).
| dst | destination buffer |
| src | source string |
| srcLen | source buffer size in code points |
Definition at line 46875 of file libsheepy.c.
| char * strLCpyUTF8 | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | src | ||
| ) |
strLCpyUTF8 - copy src to dst
like strncpy and the NUL char is always added at the end of the string and the result string is always a valid UTF-8 encoded string
| dst | destination buffer |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
| src | source string |
Definition at line 46912 of file libsheepy.c.

| char * strNCatUTF8 | ( | char * | dst, |
| const char * | src, | ||
| size_t | srcLen | ||
| ) |
strNCatUTF8 - concatenate two UTF-8 encoded strings
like strncat with sanity checks and srcLen is the number of code points
| dst | destination buffer |
| src | source string |
| srcLen | max source len in code points |
Definition at line 46941 of file libsheepy.c.
| char * strLCatUTF8 | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | src | ||
| ) |
strLCatUTF8 - concatenate two UTF-8 encoded strings
like strlcat with sanity checks the result string is always a valid UTF-8 encoded string
| dst | destination buffer |
| src | source string |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
Definition at line 46978 of file libsheepy.c.

| char * strLNCatUTF8 | ( | char * | dst, |
| size_t | dstSize, | ||
| const char * | src, | ||
| size_t | srcLen | ||
| ) |
strLNCatUTF8 - concatenate two UTF-8 encoded strings
like strlcat with sanity checks and srcLen is the number of code points the result string is always a valid UTF-8 encoded string
| dst | destination buffer |
| src | source string |
| dstSize | destination buffer size, result string will be no longer than dstSize-1 |
| srcLen | max source len in code points |
Definition at line 47023 of file libsheepy.c.

| char * icReplaceUTF8 | ( | const char UNUSED * | s, |
| const char UNUSED * | olds, | ||
| const char UNUSED * | news, | ||
| size_t UNUSED | max | ||
| ) |
ignore case Replace UTF8 encoded String the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | UTF8 encoded string olds: old UTF8 encoded string to be replaced in s news: new UTF8 encoded string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 47080 of file libsheepy.c.
| char * icReplaceCharSUTF8 | ( | const char *s | UNUSED, |
| char olds | UNUSED, | ||
| const char *news | UNUSED, | ||
| size_t max | UNUSED | ||
| ) |
Definition at line 47087 of file libsheepy.c.
| char * icReplaceSCharUTF8 | ( | const char *s | UNUSED, |
| const char *olds | UNUSED, | ||
| char news | UNUSED, | ||
| size_t max | UNUSED | ||
| ) |
Definition at line 47094 of file libsheepy.c.
| char * iicReplaceUTF8 | ( | char UNUSED ** | s, |
| const char UNUSED * | olds, | ||
| const char UNUSED * | news, | ||
| size_t UNUSED | max | ||
| ) |
in place ignore case replace UTF8 encoded String the olds UTF8 encoded string is replaced with the news UTF8 encoded string max times in the result 0 for max means replace all olds strings
| s | UTF8 encoded string olds: old UTF8 encoded string to be replaced in s news: new UTF8 encoded string replacing olds in s max: number of times to replace olds, 0 to replace all found olds |
Definition at line 47116 of file libsheepy.c.
| char * iicReplaceCharSUTF8 | ( | char **s | UNUSED, |
| char olds | UNUSED, | ||
| const char *news | UNUSED, | ||
| size_t max | UNUSED | ||
| ) |
Definition at line 47123 of file libsheepy.c.
| char * iicReplaceSCharUTF8 | ( | char **s | UNUSED, |
| const char *olds | UNUSED, | ||
| char news | UNUSED, | ||
| size_t max | UNUSED | ||
| ) |
Definition at line 47130 of file libsheepy.c.
| char * bicReplaceUTF8 | ( | char UNUSED * | s, |
| const char UNUSED * | olds, | ||
| const char UNUSED * | news, | ||
| size_t UNUSED | max | ||
| ) |
buffer ignore case replace UTF8 encoded String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string |
| olds | old string to be replaced in s |
| news | new string replacing olds in s |
| max | number of times to replace olds, 0 to replace all found olds |
Definition at line 47155 of file libsheepy.c.
| char * bLicReplaceUTF8 | ( | char UNUSED * | s, |
| size_t UNUSED | sSize, | ||
| const char UNUSED * | olds, | ||
| const char UNUSED * | news, | ||
| size_t max | UNUSED | ||
| ) |
buffer size ignore case replace UTF8 encoded String the olds string is replaced with the news string max times in the result 0 for max means replace all olds strings
| s | string |
| olds | old string to be replaced in s |
| news | new string replacing olds in s |
| max | number of times to replace olds, 0 to replace all found olds |
Definition at line 47180 of file libsheepy.c.
| char * icReplaceManyUTF8F | ( | const char *paramType | UNUSED, |
| ... | |||
| ) |
ignore case replace Many UTF8 encoded Strings the original remains unchanged duplicate s the olds string is replaced with the news string max times in the result
Example: r = replaceManyUTF8("asd", "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| s | string |
| olds | old string to be replaced in s |
| news | new string replacing olds in s ... |
Definition at line 47212 of file libsheepy.c.
| char * iicReplaceManyUTF8F | ( | char **s | UNUSED, |
| char *paramType | UNUSED, | ||
| ... | |||
| ) |
in place ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result
Example: iicReplaceManyUTF8(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | |
| olds | old string to be replaced in s |
| news | new string replacing olds in s ... |
Definition at line 47239 of file libsheepy.c.
| char * bicReplaceManyUTF8F | ( | char *s | UNUSED, |
| char *paramType | UNUSED, | ||
| ... | |||
| ) |
buffer ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyUTF8(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | |
| olds | old string to be replaced in s |
| news | new string replacing olds in s ... |
Definition at line 47266 of file libsheepy.c.
| char * bLicReplaceManyUTF8F | ( | char *s | UNUSED, |
| size_t sSize | UNUSED, | ||
| char *paramType | UNUSED, | ||
| ... | |||
| ) |
buffer size ignore case replace Many UTF8 encoded Strings the olds string is replaced with the news string max times in the result
Example: bReplaceManyUTF8(s, "s", "BNM", "a", "AAA") ^olds ^news ^olds ^news
| string | |
| olds | old string to be replaced in s |
| news | new string replacing olds in s ... |
Definition at line 47293 of file libsheepy.c.
| bool eqIUTF8 | ( | const char * | string1, |
| const char * | string2, | ||
| int64_t | index | ||
| ) |
UTF8 encoded string Index Equal compare string1 at character index to string2 when string2 is empty, the result is false.
| 2 | strings |
Definition at line 47312 of file libsheepy.c.

| bool eqICharUTF8 | ( | const char * | string1, |
| char | c, | ||
| int64_t | index | ||
| ) |
| bool icEqUTF8 | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case UTF8 encoded string Equal compare string1 to string2
| 2 | strings |
Definition at line 47343 of file libsheepy.c.


| bool icEqCharUTF8 | ( | char | c, |
| const char * | string2 | ||
| ) |
| bool icEqUTF8Char | ( | const char * | string1, |
| char | c | ||
| ) |
| bool icEqIUTF8 | ( | const char *string1 | UNUSED, |
| const char *string2 | UNUSED, | ||
| int64_t index | UNUSED | ||
| ) |
ignore case UTF8 encoded string Index Equal compare string1 at character index to string2 when string2 is empty, the result is false
| 2 | strings |
Definition at line 47396 of file libsheepy.c.
| bool icEqICharUTF8 | ( | const char *string1 | UNUSED, |
| char c | UNUSED, | ||
| int64_t index | UNUSED | ||
| ) |
Definition at line 47402 of file libsheepy.c.
| bool icStartsWithUTF8 | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case starts With UTF8 encoded String compare start of string1 with string2
| 2 | strings |
Definition at line 47419 of file libsheepy.c.

| bool icEndsWithUTF8 | ( | const char * | string1, |
| const char * | string2 | ||
| ) |
ignore case ends With UTF8 encoded String compare end of string1 with string2
| 2 | strings |
Definition at line 47444 of file libsheepy.c.

| ssize_t icCountUTF8 | ( | const char * | s, |
| const char * | needle | ||
| ) |
ignore case count UTF8 encoded String count number of (non-overlapping) occurrences of a substring
Example: assert(countUTF8("aaa aaa", "a") == 6); assert(countUTF8("aaa aaa", "ab") == 0); assert(countUTF8("aaa aaa", "aa") == 2);
| 2 | strings |
Definition at line 47480 of file libsheepy.c.

| internal localeType getLocaleType | ( | void | ) |
some case convertions depend on the current LOCALE
Definition at line 47510 of file libsheepy.c.

| rune code2RuneUTF8 | ( | const char * | code | ) |
UTF-8 code point to rune.
| code | UTF-8 code point |
Definition at line 47550 of file libsheepy.c.


| rune code2RuneLUTF8 | ( | const char * | code, |
| uint8_t * | n | ||
| ) |
UTF-8 code point to rune and length.
the code point length is returned in *n
| code | UTF-8 code point |
| n | pointer to returned code point length |
Definition at line 47569 of file libsheepy.c.


| size_t bRune2CodeUTF8 | ( | char * | dst, |
| rune | c | ||
| ) |
rune to UTF-8 code point
| dst | destination buffer at least 6 bytes or if NULL, the code point length is computed |
| c | UNICODE rune |
Definition at line 47635 of file libsheepy.c.


| uint8_t runeLenUTF8 | ( | rune | r | ) |
rune length as UTF-8 code point
| r | UNICODE rune |
Definition at line 47670 of file libsheepy.c.

Definition at line 47763 of file libsheepy.c.


| internal size_t output_marks | ( | const char ** | p_inout, |
| char * | dst, | ||
| bool | remove_dot | ||
| ) |
Definition at line 47796 of file libsheepy.c.


| internal size_t output_special_case | ( | char * | dst, |
| int | offset, | ||
| int | type, | ||
| int | which | ||
| ) |
rune toupper UTF8
Converts a character to uppercase.
| c | rune |
Definition at line 47854 of file libsheepy.c.

| internal size_t _upperUTF8 | ( | char * | dst, |
| const char * | utf8, | ||
| localeType | lcl | ||
| ) |
Definition at line 47878 of file libsheepy.c.


| char * upperUTF8 | ( | const char * | utf8 | ) |
upper case UTF-8 encoded string duplicate string
| string | UTF-8 encoded string |
Definition at line 47975 of file libsheepy.c.


| char * iUpperUTF8 | ( | char ** | utf8 | ) |
upper case UTF-8 encoded string
| string | (this parameter is reallocated) |
Definition at line 48003 of file libsheepy.c.

| char * bUpperUTF8 | ( | char *utf8 | UNUSED | ) |
buffer upper case String
| string |
Definition at line 48026 of file libsheepy.c.
runeCombiningClass: : a Unicode character
Determines the canonical combining class of a Unicode character.
Returns: the combining class of the character
Definition at line 48040 of file libsheepy.c.

| internal bool has_more_above | ( | const char * | str | ) |
Definition at line 48047 of file libsheepy.c.


rune tolower UTF8
Converts a character to lower case.
| c | UNICODE rune |
Definition at line 48078 of file libsheepy.c.

| internal size_t _lowerUTF8 | ( | char * | dst, |
| const char * | utf8, | ||
| localeType | lcl | ||
| ) |
Definition at line 48103 of file libsheepy.c.


| char * lowerUTF8 | ( | const char * | utf8 | ) |
lower case UTF-8 String duplicate string
| string |
Definition at line 48228 of file libsheepy.c.


| char * iLowerUTF8 | ( | char ** | utf8 | ) |
lower case String
| string | (this parameter is reallocated) |
Definition at line 48256 of file libsheepy.c.

| char * bLowerUTF8 | ( | char *string | UNUSED | ) |
buffer lower case String
| string |
Definition at line 48279 of file libsheepy.c.
| char * casefoldUTF8 | ( | const char * | utf8 | ) |
casefold UTF-8 encoded string
| utf8 | UTF-8 encoded string |
Definition at line 48294 of file libsheepy.c.


| char * uniqUTF8 | ( | const char * | string, |
| const char * | code | ||
| ) |
uniq UTF-8 String duplicate string
remove successive repetitions of UTF-8 code point code
| string | |
| c | character to remove |
Definition at line 48352 of file libsheepy.c.

| char * iUniqUTF8 | ( | char ** | string, |
| const char * | code | ||
| ) |
uniq UTF-8 String
remove successive repetitions of char c
| string | |
| c | character to remove |
Definition at line 48409 of file libsheepy.c.

| char * bUniqUTF8 | ( | char * | string, |
| const char * | code | ||
| ) |
buffer uniq String
remove successive repetitions of char c
| string | |
| c | character to remove |
Definition at line 48463 of file libsheepy.c.

| char * icUniqUTF8 | ( | const char *string | UNUSED, |
| const char *code | UNUSED | ||
| ) |
ignore case uniq String duplicate string
remove successive repetitions of char c
| string | |
| c | character to remove |
Definition at line 48516 of file libsheepy.c.
| char * iicUniqUTF8 | ( | char **string | UNUSED, |
| const char *code | UNUSED | ||
| ) |
in place ignore case uniq String
remove successive repetitions of char c
| string | |
| c | character to remove |
Definition at line 48535 of file libsheepy.c.
| char * bicUniqUTF8 | ( | char *string | UNUSED, |
| char c | UNUSED | ||
| ) |
ignore case buffer uniq String
remove successive repetitions of char c
| string | |
| c | character to remove |
Definition at line 48554 of file libsheepy.c.
| rune getUTF8 | ( | const char * | string, |
| int64_t | index | ||
| ) |
get UTF8 encoded string
get char at python index
Definition at line 48567 of file libsheepy.c.

| char * setUTF8 | ( | char * | string, |
| int64_t | index, | ||
| rune | c | ||
| ) |
set UTF8 encoded string
set char at python index
TODO this function might make the string invalid UTF8 check codeSizeUTF8 and adjust the buffer
Definition at line 48598 of file libsheepy.c.

| char * sliceUTF8 | ( | const char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
slice UTF8 encoded String return new string which is the string between start and end negative indexes are allowed
(copy substring from start to end)
| string | to slice |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 48641 of file libsheepy.c.

| char * iSliceUTF8 | ( | char ** | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed
| string | to slice (this parameter is reallocated) |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 48712 of file libsheepy.c.

| char * bSliceUTF8 | ( | char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed
| string | to slice |
| start | start index, must be in the string |
| end | end index, must be in the string after start |
Definition at line 48791 of file libsheepy.c.

| char * bLSliceUTF8 | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer size slice UTF8 encoded String return string which is the string between start and end negative indexes are allowed
| string | to slice |
| stringSize | string buffer size |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 48862 of file libsheepy.c.

| char * insertUTF8 | ( | const char * | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
insert string in UTF8 encoded string at index
return new string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 48956 of file libsheepy.c.

| char * insertNFreeUTF8 | ( | const char * | string, |
| int64_t | index, | ||
| char * | toInsert | ||
| ) |
insert string in UTF8 encoded string at index and free toInsert
return new string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 49029 of file libsheepy.c.

| char * iInsertUTF8 | ( | char ** | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
insert string in UTF8 encoded string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string (this parameter is reallocated) |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 49110 of file libsheepy.c.

| char * iInsertNFreeUTF8 | ( | char ** | string, |
| int64_t | index, | ||
| char * | toInsert | ||
| ) |
insert string in UTF8 encoded string at index and free toInsert
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string (this parameter is reallocated) |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 49191 of file libsheepy.c.

| char * bInsertUTF8 | ( | char * | string, |
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
buffer insert string in UTF8 encoded string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 49275 of file libsheepy.c.

| char * bLInsertUTF8 | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | index, | ||
| const char * | toInsert | ||
| ) |
buffer size insert string in UTF8 encoded string at index
return string with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| string | UTF8 encoded string |
| index | character index in string |
| toInsert | UTF8 encoded string |
Definition at line 49347 of file libsheepy.c.

| char * delUTF8 | ( | const char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
delete UTF8 encoded string
return new string without the string between start and end negative indexes are allowed
| string | to delete |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 49424 of file libsheepy.c.

| char * iDelUTF8 | ( | char ** | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
delete UTF8 encoded string
return string without the string between start and end negative indexes are allowed
| string | to delete (this parameter is reallocated) |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 49499 of file libsheepy.c.

| char * bDelUTF8 | ( | char * | string, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer delete UTF8 encoded string
return string without the string between start and end negative indexes are allowed
| string | to delete |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 49576 of file libsheepy.c.

| char * bLDelUTF8 | ( | char * | string, |
| size_t | stringSize, | ||
| int64_t | start, | ||
| int64_t | end | ||
| ) |
buffer size delete UTF8 encoded string
return string without the string between start and end negative indexes are allowed
| string | to delete |
| stringSize | string buffer size |
| start | start character index, must be in the string |
| end | end character index, must be in the string after start |
Definition at line 49647 of file libsheepy.c.

| ssize_t indexOfUTF8 | ( | const char * | string, |
| const char * | needle | ||
| ) |
indexOf UTF8 encoded String relative to start
| string | |
| needle | string to find |
Definition at line 49726 of file libsheepy.c.

| ssize_t icIndexOfUTF8 | ( | const char *string | UNUSED, |
| const char *needle | UNUSED | ||
| ) |
ignore case indexOf UTF8 encoded String relative to start
| string | |
| needle | string to find |
Definition at line 49749 of file libsheepy.c.
| bool icHasUTF8 | ( | const char * | string, |
| const char * | needle | ||
| ) |
ignore case has UTF8 encoded String
| string | |
| needle | string to find |
Definition at line 49768 of file libsheepy.c.

| char * icTokUTF8 | ( | const char *s | UNUSED, |
| const char *delim | UNUSED, | ||
| char **saveptr | UNUSED | ||
| ) |
ignore case token in UTF8 encoded String
parse string into a sequence of tokens delimited by the ENTIRE DELIM string work like strtok_r from c stdlib (for strtok_r, when delim has multiple characters, each character is a delimiter)
on first call s is the string to parse, optionally initialize *saveptr to NULL on next calls, s should be NULL
| s | string to parse, the s string is modified |
| delim | string |
Definition at line 49804 of file libsheepy.c.
| char ** icSplitUTF8 | ( | const char *string | UNUSED, |
| const char *delim | UNUSED | ||
| ) |
ignore case split UTF8 encoded string with delim string return list
| string | to split |
| delim | delimiter |
Definition at line 49823 of file libsheepy.c.
| char ** icExtractUTF8 | ( | const char *string | UNUSED, |
| const char *delim1 | UNUSED, | ||
| const char *delim2 | UNUSED | ||
| ) |
ignore case extract UTF8 encoded string between delim1 and delim2 strings return list
| string | to split |
| delim1 | first delimiter |
| delim2 | second delimiter, has to different from delim1 |
Definition at line 49843 of file libsheepy.c.
| char ** icExtractCharSUTF8 | ( | const char *string | UNUSED, |
| char delim1 | UNUSED, | ||
| const char *delim2 | UNUSED | ||
| ) |
Definition at line 49849 of file libsheepy.c.
| char ** icExtractSCharUTF8 | ( | const char *string | UNUSED, |
| const char *delim1 | UNUSED, | ||
| char delim2 | UNUSED | ||
| ) |
Definition at line 49855 of file libsheepy.c.
| internal int icListSortUTF8Cmp | ( | const void * | a, |
| const void * | b | ||
| ) |
ignore case list Sort UTF-8 encoded String Compare function
in: a b out: test result
Definition at line 49871 of file libsheepy.c.


| char ** icListSortUTF8 | ( | char ** | list | ) |
ignore case list Sort UTF8 encoded String duplicate list and sort
| list |
Definition at line 49903 of file libsheepy.c.

| char ** iicListSortUTF8 | ( | char *** | list | ) |
ignore case list Sort UTF8 encoded String
| list |
Definition at line 49934 of file libsheepy.c.

| bool icListEqUTF8 | ( | char ** | list1, |
| char ** | list2 | ||
| ) |
ignore case list Equal UTF8 encoded String compare each element of list1 and list2
| 2 | lists |
Definition at line 49961 of file libsheepy.c.

| bool icListHasUTF8 | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case and return true when list has UTF8 encoded string
| list | |
| string |
Definition at line 49994 of file libsheepy.c.

| ssize_t icListIndexOfUTF8 | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case and return index of UTF8 encoded string in list
| list | |
| string |
Definition at line 50018 of file libsheepy.c.


| ssize_t icListBinarySearchUTF8 | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case list binary search UTF8 encoded string
efficiently finds the index of string in list the list has be sorted with for example listSortS
| list | |
| string | to search |
Definition at line 50055 of file libsheepy.c.

| char ** icListUniqUTF8 | ( | char ** | list | ) |
ignore case and uniquify UTF8 encoded elements of list duplicate list each elements are unique in the new list
| list |
Definition at line 50098 of file libsheepy.c.

| char ** iicListUniqUTF8 | ( | char *** | list | ) |
ignore case and uniquify UTF8 encoded elements of list each elements are unique in the list
| list |
Definition at line 50139 of file libsheepy.c.

| char * emptySF | ( | void | ) |
empty String Function
Definition at line 50188 of file libsheepy.c.

| char * iEmptySF | ( | char ** | string | ) |
empty String Function
when *string is NULL, it is freed
Definition at line 50202 of file libsheepy.c.


| bool isEmptyS | ( | const char * | string | ) |
is Empty String
| string |
Definition at line 50226 of file libsheepy.c.

| bool isBlankS | ( | const char * | string | ) |
is Blank String
| string |
Definition at line 50246 of file libsheepy.c.


| ssize_t intIndex | ( | int64_t | index, |
| int64_t | length | ||
| ) |
int to positive index index can be negative
| index | index in list, must be inside the list |
| length | list length |
Definition at line 50275 of file libsheepy.c.
| char ** listEmptySF | ( | void | ) |
list Empty String Function
Definition at line 50305 of file libsheepy.c.
| char ** iListEmptySF | ( | char *** | list | ) |
list Empty String Function
Definition at line 50322 of file libsheepy.c.


| bool listIsEmptyS | ( | char ** | list | ) |
list Is Empty String
| list |
Definition at line 50351 of file libsheepy.c.

| bool listIsBlankS | ( | char ** | list | ) |
list Is Empty String
| list |
Definition at line 50370 of file libsheepy.c.

| char ** listCreateSF | ( | const char * | paramType, |
| ... | |||
| ) |
list Create String Function create a list from the list of parameters used from the listCreateS(...) macro
| list | of strings seperated with commas |
Definition at line 50395 of file libsheepy.c.

| char ** listFromArrayS | ( | char ** | array, |
| size_t | size | ||
| ) |
list From Array String
copy array of 'size' strings to a new list NULL strings are not copied to the list
| array | of strings |
| size | - number of strings in the array |
Definition at line 50427 of file libsheepy.c.


| char ** listFromCArrayS | ( | const char ** | array, |
| size_t | size | ||
| ) |
list From Const Array String
copy array of 'size' strings to a new list NULL strings are not copied to the list
| array | of strings |
| size | - number of strings in the array |
Definition at line 50465 of file libsheepy.c.


| char ** listPushS | ( | char *** | list, |
| const char * | s | ||
| ) |
list Push String append s at the end of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | string to push |
Definition at line 50504 of file libsheepy.c.


| char ** listPushCharS | ( | char *** | list, |
| char | c | ||
| ) |
| char ** iListPushS | ( | char *** | list, |
| char * | s | ||
| ) |
list Push String append s pointer at the end of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | string to push |
Definition at line 50559 of file libsheepy.c.


| char * listPopS | ( | char *** | list | ) |
list Pop String return last string from list and remove last element from the list
| pointer | to list |
Definition at line 50602 of file libsheepy.c.


| char ** listPrependS | ( | char *** | list, |
| const char * | s | ||
| ) |
list Prepend String append s at the beginning of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, the operation is canceled
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | string to prepend |
Definition at line 50641 of file libsheepy.c.


| char ** listPrependCharS | ( | char *** | list, |
| char | c | ||
| ) |
| char ** iListPrependS | ( | char *** | list, |
| char * | s | ||
| ) |
list Prepend String append s pointer at the beginning of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, the operation is canceled
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | string to prepend |
Definition at line 50700 of file libsheepy.c.

| char * listDequeueS | ( | char *** | list | ) |
list Dequeue String return first string from list and remove it from the list
| pointer | to list |
Definition at line 50746 of file libsheepy.c.


| void listFreeS | ( | char ** | list | ) |
list Free String
| list |
Definition at line 50780 of file libsheepy.c.


| void listFreeManySF | ( | char ** | paramType, |
| ... | |||
| ) |
list free many String
free variable list of pointers listFreeManyS(l1, l2, ...);
Definition at line 50797 of file libsheepy.c.

| size_t listLengthS | ( | char ** | list | ) |
list Length String return number of elements until the first NULL element
| list |
Definition at line 50820 of file libsheepy.c.

| size_t listLengthCS | ( | const char ** | list | ) |
const list Length String return number of elements until the first NULL element
| list |
Definition at line 50843 of file libsheepy.c.

| ssize_t listStrLengthS | ( | char ** | list | ) |
list String Length String
| list |
Definition at line 50865 of file libsheepy.c.
| ssize_t listIntIndexS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list int to index String index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 50892 of file libsheepy.c.

| char ** listAddrS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list address String index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 50929 of file libsheepy.c.

| char * listGetS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list Get String duplicate string at given index index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 50967 of file libsheepy.c.


| char * iListGetS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list Get String index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 51001 of file libsheepy.c.


| char * listGetCS | ( | const char ** | list, |
| int64_t | index | ||
| ) |
const list Get String duplicate string at given index index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 51036 of file libsheepy.c.


| const char * iListGetCS | ( | const char ** | list, |
| int64_t | index | ||
| ) |
const list Get String index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 51070 of file libsheepy.c.


| char ** listSetS | ( | char ** | list, |
| int64_t | index, | ||
| const char * | s | ||
| ) |
list Set String duplicate string and store at given index, the existing element is freed index can be negative
| list | |
| index | index in list, must be inside the list |
| string |
Does nothing when: when list is NULL, index is not set correctly or s is NULL
Definition at line 51110 of file libsheepy.c.


| char ** listSetCharS | ( | char ** | list, |
| int64_t | index, | ||
| char | c | ||
| ) |
| char ** iListSetS | ( | char ** | list, |
| int64_t | index, | ||
| char * | s | ||
| ) |
list Set String store string at given index index can be negative
| list | |
| index | index in list, must be inside the list |
| string |
Does nothing when: when list is NULL, index is not set correctly or s is NULL
Definition at line 51158 of file libsheepy.c.


| char ** listSwapS | ( | char ** | list, |
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap elements in list
| list | |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 51195 of file libsheepy.c.

| char ** iListSwapS | ( | char ** | list, |
| int64_t | index1, | ||
| int64_t | index2 | ||
| ) |
swap elements in list
| list | |
| index1 | index of character to swap |
| index2 | index of second character to swap |
Definition at line 51245 of file libsheepy.c.

| char ** split | ( | const char * | string, |
| const char * | delim | ||
| ) |
split string with delim string when updating this function, also update splitS (identical to split) return list
| string | to split |
| delim | delimiter |
Definition at line 51294 of file libsheepy.c.


| char ** splitS | ( | const char * | string, |
| const char * | delim | ||
| ) |
| char ** splitChar | ( | const char * | string, |
| char | delim | ||
| ) |
| char ** icSplit | ( | const char * | string, |
| const char * | delim | ||
| ) |
ignore case split string with delim string when updating this function, also update icSplitS (identical to icSplit) return list
| string | to split |
| delim | delimiter |
Definition at line 51407 of file libsheepy.c.


| char ** icSplitS | ( | const char * | string, |
| const char * | delim | ||
| ) |
| char ** icSplitChar | ( | const char * | string, |
| char | delim | ||
| ) |
| ssize_t joinLength | ( | char ** | list, |
| const char * | delim | ||
| ) |
join Length list length after joined with delimiter
| list | |
| delim | string seperator |
Definition at line 51519 of file libsheepy.c.
| char * join | ( | char ** | list, |
| const char * | delim | ||
| ) |
join list, the elements are seperated with delim in the resulting string when updating this function, also update joinS (identical to join)
| list | |
| delim | string seperator |
Definition at line 51554 of file libsheepy.c.


| char * joinS | ( | char ** | list, |
| const char * | delim | ||
| ) |
| char * joinCS | ( | const char ** | list, |
| const char * | delim | ||
| ) |
join list, the elements are seperated with delim in the resulting string
| list | |
| delim | string seperator |
Definition at line 51633 of file libsheepy.c.


| char * joinChar | ( | char ** | list, |
| char | delim | ||
| ) |
| char * bJoin | ( | char * | string, |
| char ** | list, | ||
| const char * | delim | ||
| ) |
buffer join list, the elements are seperated with delim in the resulting string
| list | |
| delim | string seperator |
Definition at line 51683 of file libsheepy.c.


| char * bJoinChar | ( | char * | string, |
| char ** | list, | ||
| char | delim | ||
| ) |
| char * bLJoin | ( | char * | string, |
| size_t | stringSize, | ||
| char ** | list, | ||
| const char * | delim | ||
| ) |
buffer size join list, the elements are seperated with delim in the resulting string
| list | |
| delim | string seperator |
Definition at line 51720 of file libsheepy.c.


| char * bLJoinChar | ( | char * | string, |
| size_t | stringSize, | ||
| char ** | list, | ||
| char | delim | ||
| ) |
| char ** extractS | ( | const char * | string, |
| const char * | delim1, | ||
| const char * | delim2 | ||
| ) |
extract string between delim1 and delim2 strings return list
| string | to split |
| delim1 | first delimiter |
| delim2 | second delimiter, has to be different from delim1 |
Definition at line 51765 of file libsheepy.c.


| char ** extractCharSS | ( | const char * | string, |
| char | delim1, | ||
| const char * | delim2 | ||
| ) |
| char ** extractSCharS | ( | const char * | string, |
| const char * | delim1, | ||
| char | delim2 | ||
| ) |
| char ** extractCharCharS | ( | const char * | string, |
| char | delim1, | ||
| char | delim2 | ||
| ) |
| char ** icExtractS | ( | const char * | string, |
| const char * | delim1, | ||
| const char * | delim2 | ||
| ) |
ignore case extract string between delim1 and delim2 strings return list
| string | to split |
| delim1 | first delimiter |
| delim2 | second delimiter, has to different from delim1 |
Definition at line 51838 of file libsheepy.c.


| char ** icExtractCharSS | ( | const char * | string, |
| char | delim1, | ||
| const char * | delim2 | ||
| ) |
| char ** icExtractSCharS | ( | const char * | string, |
| const char * | delim1, | ||
| char | delim2 | ||
| ) |
| char ** icExtractCharCharS | ( | const char * | string, |
| char | delim1, | ||
| char | delim2 | ||
| ) |
| char ** listDupS | ( | char ** | list | ) |
list Duplicate String
| list |
Definition at line 51906 of file libsheepy.c.


| char ** listDupCS | ( | const char ** | list | ) |
const list Duplicate String
| list |
Definition at line 51940 of file libsheepy.c.


| char ** iListDupS | ( | char ** | list | ) |
list Duplicate String
copy pointers to new list After this function, free list with free instead of listFreeS
Note: this function creates a new list, so char *** is not needed. Unlike iList functions.
| list |
Definition at line 51980 of file libsheepy.c.

| char ** listReverseS | ( | char ** | list | ) |
list Reverse String duplicate and reverse list, the last element is the first element of the new list
| list |
Definition at line 52015 of file libsheepy.c.

| char ** iListReverseS | ( | char *** | list | ) |
list Reverse String reverse list, the last element is the first element of the list
| list | (this parameter is reallocated) |
Definition at line 52051 of file libsheepy.c.

| char ** listCatSF | ( | char ** | paramType, |
| ... | |||
| ) |
list Cat String
| arbitrary | list of lists seperated by commas |
Definition at line 52086 of file libsheepy.c.

| char ** listAppendS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
list Append String Append list2 at the end of list1
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52116 of file libsheepy.c.


| char ** iListAppendS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
in place list Append String Append list2 at the end of list1 by copying the pointers from list2 to list1.
After this function, free list2 with free instead of listFreeS
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52199 of file libsheepy.c.


| char ** iListAppendNSmashS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
list Append and smash list2 Append list2 at the end of list1 by copying the pointers from list2 to list1.
list2 is freed (except when there is an error)
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52273 of file libsheepy.c.

| char ** listShiftS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
list Shift String Append list2 at the start of list1
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52298 of file libsheepy.c.

| char ** iListShiftS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
in place list Shift String Append list2 at the start of list1 by copying the pointers from list2 to list1.
After this function, free list2 with free instead of listFreeS
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52330 of file libsheepy.c.

| char ** iListShiftNSmashS | ( | char *** | list1, |
| char ** | list2 | ||
| ) |
list Append and smash list2 Append list2 at the start of list1 by copying the pointers from list2 to list1.
list2 is freed (except when there is an error)
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 52354 of file libsheepy.c.

| char ** listAddS | ( | char ** | list1, |
| char ** | list2 | ||
| ) |
list Add String add list1 and list2 in a new list
| list1 | |
| list2 |
Definition at line 52372 of file libsheepy.c.


| char ** listAddCS | ( | char ** | list1, |
| const char ** | list2 | ||
| ) |
const list Add String add list1 and list2 in a new list
| list1 | |
| list2 |
Definition at line 52423 of file libsheepy.c.


| char ** listSliceS | ( | char ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Slice String return new list with elements from start and end in list negative indexes are allowed
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 52479 of file libsheepy.c.


| char ** iListCopyS | ( | char ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Copy String return new list with element pointers from start and end in list negative indexes are allowed
Note: this function creates a new list, so char *** is not needed. Unlike iList functions.
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 52552 of file libsheepy.c.


| char ** iListSliceS | ( | char *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Slice String return list with elements from start and end in list negative indexes are allowed
| list | (this parameter is reallocated) |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 52623 of file libsheepy.c.


| char ** listCropS | ( | char ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Crop String return a new list with elements from start and end in list and delete elements from start to end in the original list negative indexes are allowed
iListCropS is faster than listSliceS+iListDelS because only the string pointers are copied to the sliced list
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 52717 of file libsheepy.c.

| char ** iListCropS | ( | char *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Crop String return a new list with elements from start and end in list and delete elements from start to end in the original list negative indexes are allowed
iListCropS is faster than listSliceS+iListDelS because only the string pointers are copied to the sliced list
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 52799 of file libsheepy.c.

| char * listCropElemS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list Crop Element String return element at index and delete element at index in the original list negative indexes are allowed
iListCropS is faster than listSliceS+iListDelElemS because only the string pointer is returned directly
| list | |
| index | must be in the list |
Definition at line 52879 of file libsheepy.c.

| char * iListCropElemS | ( | char *** | list, |
| int64_t | index | ||
| ) |
list Crop Element String return element at index and delete element at index in the original list negative indexes are allowed
iListCropS is faster than listSliceS+iListDelElemS because only the string pointer is returned directly
| list | |
| index | must be in the list |
Definition at line 52933 of file libsheepy.c.

| char ** listInsertS | ( | char ** | list, |
| int64_t | index, | ||
| char ** | toInsert | ||
| ) |
list Insert string
insert list in list at index
return new list with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | |
| index | in list |
| toInsert | list |
Definition at line 52986 of file libsheepy.c.


| char ** iListInsertS | ( | char *** | list, |
| int64_t | index, | ||
| char ** | toInsert | ||
| ) |
list Insert string
insert list in list at index After this function, free toInsert with free instead of listFreeS
return list with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | (this parameter is reallocated) |
| index | in list |
| toInsert | list |
Definition at line 53060 of file libsheepy.c.


| char ** iListInsertNFreeS | ( | char *** | list, |
| int64_t | index, | ||
| char ** | toInsert | ||
| ) |
list Insert string and free toInsert
insert list in list at index
return list with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | (this parameter is reallocated) |
| index | in list |
| toInsert | list |
Definition at line 53161 of file libsheepy.c.


| char ** listInjectS | ( | char ** | list, |
| int64_t | index, | ||
| char * | toInject | ||
| ) |
list Inject string
Inject string in list at index
return new list with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | |
| index | in list |
| toInject | string |
Definition at line 53254 of file libsheepy.c.


| char ** listInjectCharS | ( | char ** | list, |
| int64_t | index, | ||
| char | toInject | ||
| ) |
| char ** iListInjectS | ( | char *** | list, |
| int64_t | index, | ||
| char * | toInject | ||
| ) |
list Inject string
Inject string pointer in list at index
return list with toInject at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | (this parameter is reallocated) |
| index | in list |
| toInject | string |
Definition at line 53339 of file libsheepy.c.


| char ** iListInjectCharS | ( | char *** | list, |
| int64_t | index, | ||
| char | toInject | ||
| ) |
| char ** listDelS | ( | char ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Delete String return new list without elements from start and end in list negative indexes are allowed
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 53435 of file libsheepy.c.

| char ** iListDelS | ( | char *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Delete String return list without elements from start and end in list negative indexes are allowed
| list | (this parameter is reallocated) |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 53512 of file libsheepy.c.

| char ** iListRemoveS | ( | char *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Remove String return list without elements from start and end in list the elements are removed without being freed negative indexes are allowed
| list | (this parameter is reallocated) |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 53595 of file libsheepy.c.

| char ** listDelElemS | ( | char ** | list, |
| int64_t | index | ||
| ) |
list Delete Element String return new list without the element at index negative indexes are allowed
| list | |
| index | must be in the list |
Definition at line 53670 of file libsheepy.c.

| char ** iListDelElemS | ( | char *** | list, |
| int64_t | index | ||
| ) |
list Delete Element String return list without the element at index negative indexes are allowed
| list | (this parameter is reallocated) |
| index | must be in the list |
Definition at line 53725 of file libsheepy.c.

| char ** iListRemoveElemS | ( | char *** | list, |
| int64_t | index | ||
| ) |
list Remove Element String return list without the element at index the element is removed without being freed negative indexes are allowed
| list | (this parameter is reallocated) |
| index | must be in the list |
Definition at line 53785 of file libsheepy.c.

| int listPrintS | ( | char ** | list | ) |
print list elements to stdout
when list is NULL, returns directly without doing anything
| list |
Definition at line 53841 of file libsheepy.c.

| int listPrintCS | ( | const char ** | list | ) |
| internal int listSortSCmp | ( | const void * | a, |
| const void * | b | ||
| ) |
list Sort String Compare function
in: a b out: test result
Definition at line 53872 of file libsheepy.c.

| char ** listSortS | ( | char ** | list | ) |
list Sort String duplicate list and sort
| list |
Definition at line 53898 of file libsheepy.c.

| char ** iListSortS | ( | char *** | list | ) |
list Sort String
| list |
Definition at line 53928 of file libsheepy.c.


| char ** listSortFS | ( | char ** | list, |
| shCmpt | compareFunction | ||
| ) |
list Sort String duplicate list and sort
| list | compareFunction |
Definition at line 53956 of file libsheepy.c.

| char ** iListSortFS | ( | char *** | list, |
| shCmpt | compareFunction | ||
| ) |
list Sort String
| list | compareFunction |
Definition at line 53987 of file libsheepy.c.

| internal int icListSortSCmp | ( | const void * | a, |
| const void * | b | ||
| ) |
ignore case list Sort String Compare function
in: a b out: test result
Definition at line 54013 of file libsheepy.c.

| char ** icListSortS | ( | char ** | list | ) |
ignore case list Sort String duplicate list and sort
| list |
Definition at line 54039 of file libsheepy.c.

| char ** iicListSortS | ( | char *** | list | ) |
ignore case list Sort String
| list |
Definition at line 54069 of file libsheepy.c.

| char ** readText | ( | const char * | filePath | ) |
return text from filePath in a list new line characters are removed
| filePath | file path |
Definition at line 54122 of file libsheepy.c.


| char ** readStream | ( | FILE * | fp | ) |
return text from stream fp in a list new line characters are removed
| fp | file stream |
Definition at line 54187 of file libsheepy.c.


| bool writeText | ( | const char * | filePath, |
| char ** | list | ||
| ) |
write list to filePath
| filePath | |
| list |
Definition at line 54230 of file libsheepy.c.


| bool writeCText | ( | const char * | filePath, |
| const char ** | list | ||
| ) |
write const list to filePath
| filePath | |
| list |
Definition at line 54267 of file libsheepy.c.


| bool writeStream | ( | FILE * | fp, |
| char ** | list | ||
| ) |
write list to stream
| fp | file stream |
| list |
Definition at line 54304 of file libsheepy.c.

| bool writeCStream | ( | FILE * | fp, |
| const char ** | list | ||
| ) |
write const list to stream
| fp | file stream |
| list |
Definition at line 54328 of file libsheepy.c.

| bool appendText | ( | const char * | filePath, |
| char ** | list | ||
| ) |
append list to filePath
| filePath | |
| list |
Definition at line 54352 of file libsheepy.c.


| bool appendCText | ( | const char * | filePath, |
| const char ** | list | ||
| ) |
append const list to filePath
| filePath | |
| list |
Definition at line 54389 of file libsheepy.c.


| char ** execOut | ( | const char * | cmd | ) |
execute command return stdout from cmd
| cmd | command |
Definition at line 54426 of file libsheepy.c.


| char ** systemOutf | ( | const char * | fmt, |
| ... | |||
| ) |
execute system command with formatting
| formatting |
Definition at line 54458 of file libsheepy.c.

| int systemf | ( | const char * | fmt, |
| ... | |||
| ) |
execute system command with formatting
| formatting |
Definition at line 54484 of file libsheepy.c.
| int commandF | ( | const char * | cmd, |
| int | line, | ||
| const char * | thisFunc, | ||
| const char * | thisFileName | ||
| ) |
run command in default shell
Exit value equals to 127 is considered an error because if a shell could not be executed in the child process, then the return value from system() is 127 (man 3 system).
| cmd | command string |
Definition at line 54514 of file libsheepy.c.


| int commandfF | ( | int | line, |
| const char * | thisFunc, | ||
| const char * | thisFileName, | ||
| const char * | fmt, | ||
| ... | |||
| ) |
run command with formatting in default shell
Exit value equals to 127 is considered an error because if a shell could not be executed in the child process, then the return value from system() is 127 (man 3 system).
| formatting |
Definition at line 54551 of file libsheepy.c.

| int commandNFreeF | ( | char * | cmd, |
| int | line, | ||
| const char * | thisFunc, | ||
| const char * | thisFileName | ||
| ) |
run command in default shell and free the cmd parameter
Exit value equals to 127 is considered an error because if a shell could not be executed in the child process, then the return value from system() is 127 (man 3 system).
| cmd | command string |
Definition at line 54581 of file libsheepy.c.


| bool listEqS | ( | char ** | list1, |
| char ** | list2 | ||
| ) |
list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 54599 of file libsheepy.c.

| bool listEqCS | ( | char ** | list1, |
| const char ** | list2 | ||
| ) |
const(list2) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 54629 of file libsheepy.c.


| bool listEqC1S | ( | const char ** | list1, |
| char ** | list2 | ||
| ) |
const(list1) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 54659 of file libsheepy.c.


| bool listEqCCS | ( | const char ** | list1, |
| const char ** | list2 | ||
| ) |
const(list1 and 2) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 54689 of file libsheepy.c.


| bool listHasS | ( | char ** | list, |
| const char * | string | ||
| ) |
return true when list has string
| list | |
| string |
Definition at line 54721 of file libsheepy.c.


| bool listHasCS | ( | const char ** | list, |
| const char * | string | ||
| ) |
return true when const list has string
| list | |
| string |
Definition at line 54744 of file libsheepy.c.


| bool listHasCharS | ( | char ** | list, |
| char | c | ||
| ) |
| bool listHasCharCS | ( | const char ** | list, |
| char | c | ||
| ) |
Definition at line 54761 of file libsheepy.c.


| ssize_t listIndexOfS | ( | char ** | list, |
| const char * | string | ||
| ) |
return index of string in list
| list | |
| string |
Definition at line 54779 of file libsheepy.c.

| ssize_t listIndexOfCS | ( | const char ** | list, |
| const char * | string | ||
| ) |
return index of string in const list
| list | |
| string |
Definition at line 54813 of file libsheepy.c.

| ssize_t listIndexOfCharS | ( | char ** | list, |
| char | c | ||
| ) |
| ssize_t listIndexOfCharCS | ( | const char ** | list, |
| char | c | ||
| ) |
Definition at line 54841 of file libsheepy.c.


| ssize_t listBinarySearchS | ( | char ** | list, |
| const char * | string | ||
| ) |
list binary search string
efficiently finds the index of string in list the list has to be sorted with for example listSortS
| list | |
| string | to search |
Definition at line 54861 of file libsheepy.c.


| ssize_t listBinarySearchCharS | ( | char ** | list, |
| char | c | ||
| ) |
| char ** listUniqS | ( | char ** | list | ) |
Uniquify elements of list duplicate list each elements are unique in the new list.
| list |
Definition at line 54902 of file libsheepy.c.

| char ** iListUniqS | ( | char *** | list | ) |
Uniquify elements of list each elements are unique in the list.
| list | (this parameter is reallocated) |
Definition at line 54942 of file libsheepy.c.


| bool icListEqS | ( | char ** | list1, |
| char ** | list2 | ||
| ) |
ignore case list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 54986 of file libsheepy.c.

| bool icListEqCS | ( | char ** | list1, |
| const char ** | list2 | ||
| ) |
ignore case const(list2) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 55016 of file libsheepy.c.


| bool icListEqC1S | ( | const char ** | list1, |
| char ** | list2 | ||
| ) |
ignore case const(list1) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 55046 of file libsheepy.c.


| bool icListEqCCS | ( | const char ** | list1, |
| const char ** | list2 | ||
| ) |
ignore case const(list1 and 2) list Equal String compare each element of list1 and list2
| 2 | lists |
Definition at line 55076 of file libsheepy.c.


| bool icListHasS | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case and return true when list has string
| list | |
| string |
Definition at line 55108 of file libsheepy.c.


| bool icListHasCharS | ( | char ** | list, |
| char | c | ||
| ) |
| bool icListHasCS | ( | const char ** | list, |
| const char * | string | ||
| ) |
ignore case and return true when const list has string
| list | |
| string |
Definition at line 55137 of file libsheepy.c.


| bool icListHasCharCS | ( | const char ** | list, |
| char | c | ||
| ) |
Definition at line 55148 of file libsheepy.c.


| ssize_t icListIndexOfS | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case and return index of string in list
| list | |
| string |
Definition at line 55166 of file libsheepy.c.


| ssize_t icListIndexOfCS | ( | const char ** | list, |
| const char * | string | ||
| ) |
ignore case and return index of string in const list
| list | |
| string |
Definition at line 55200 of file libsheepy.c.


| ssize_t icListIndexOfCharS | ( | char ** | list, |
| char | c | ||
| ) |
| ssize_t icListIndexOfCharCS | ( | const char ** | list, |
| char | c | ||
| ) |
Definition at line 55228 of file libsheepy.c.


| ssize_t icListBinarySearchS | ( | char ** | list, |
| const char * | string | ||
| ) |
ignore case list binary search string
efficiently finds the index of string in list the list has be sorted with for example listSortS
| list | |
| string | to search |
Definition at line 55248 of file libsheepy.c.


| ssize_t icListBinarySearchCharS | ( | char ** | list, |
| char | c | ||
| ) |
| char ** icListUniqS | ( | char ** | list | ) |
ignore case and uniquify elements of list duplicate list each elements are unique in the new list
| list |
Definition at line 55289 of file libsheepy.c.

| char ** iicListUniqS | ( | char *** | list | ) |
ignore case and uniquify elements of list each elements are unique in the list
| list | (this parameter is reallocated) |
Definition at line 55329 of file libsheepy.c.


| char ** listCompactS | ( | char ** | list | ) |
remove empty strings from list
| list |
Definition at line 55373 of file libsheepy.c.

| char ** iListCompactS | ( | char *** | list | ) |
remove empty strings from list
| list | (this parameter is reallocated) |
Definition at line 55407 of file libsheepy.c.


| void btraceEnable | ( | void | ) |
Definition at line 55441 of file libsheepy.c.
| void btraceDisable | ( | void | ) |
| bool btraceConfig | ( | void | ) |
| void ** listEmptyF | ( | void | ) |
list Empty Function
Definition at line 55649 of file libsheepy.c.
| void ** iListEmptyF | ( | void *** | list | ) |
list Empty Function
| list | list to empty (this parameter is reallocated) |
Definition at line 55668 of file libsheepy.c.

| bool listIsEmpty | ( | void ** | list | ) |
list Is Empty
| list |
Definition at line 55696 of file libsheepy.c.

| void ** listCreateF | ( | void * | paramType, |
| ... | |||
| ) |
list Create Function create a list from the list of parameters used from the listCreate(...) macro
| list | of elements seperated with commas |
Definition at line 55716 of file libsheepy.c.

| void ** listFromArray | ( | void ** | array, |
| size_t | size | ||
| ) |
list From Array
copy array of 'size' to a new list NULL elements are not copied to the list
| array | |
| size | - number of elements in the array |
Definition at line 55748 of file libsheepy.c.

| void ** listPush | ( | void *** | list, |
| void * | s | ||
| ) |
list Push
(like iListPushS)
append s pointer at the end of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | element to push |
Definition at line 55790 of file libsheepy.c.


| void * listPop | ( | void *** | list | ) |
list Pop return last element from list and remove last element from the list
| pointer | to list (this parameter is reallocated) |
Definition at line 55832 of file libsheepy.c.

| void ** listPrepend | ( | void *** | list, |
| void * | s | ||
| ) |
list Prepend
(like iListPrependS)
append s pointer at the beginning of the list when list is NULL, a new list with one element is returned when list and s are NULL return list with 2 NULL elements when s is NULL, NULL is pushed at the end of the list
the list is reallocated to add extra space
| pointer | to list - becomes NULL when realloc fails (this parameter is reallocated) |
| s | element to prepend |
Definition at line 55874 of file libsheepy.c.

| void * listDequeue | ( | void *** | list | ) |
list Dequeue return first element from list and remove last element from the list
| pointer | to list |
Definition at line 55920 of file libsheepy.c.

| void listFree | ( | void ** | list | ) |
list Free
| list |
Definition at line 55954 of file libsheepy.c.


| void listFreeManyF | ( | void ** | paramType, |
| ... | |||
| ) |
list free many
free variable list of pointers listFreeManyS(l1, l2, ...);
Definition at line 55971 of file libsheepy.c.

| size_t listLength | ( | void ** | list | ) |
list Length return number of elements until the first NULL element
| list |
Definition at line 55994 of file libsheepy.c.

| void * listGet | ( | void ** | list, |
| int64_t | index | ||
| ) |
list Get
(like iListGetS)
index can be negative
| list | |
| index | index in list, must be inside the list |
Definition at line 56022 of file libsheepy.c.

| void ** listSet | ( | void ** | list, |
| int64_t | index, | ||
| void * | s | ||
| ) |
list Set
(like iListSetS)
store element at given index previous element at index has to be freed before hand index can be negative
| list | |
| index | index in list, must be inside the list |
| element |
Does nothing when: when list is NULL, index is not set correctly or s is NULL
Definition at line 56066 of file libsheepy.c.

| void ** listDup | ( | void ** | list | ) |
list Duplicate
(like iListDupS)
copy pointers to new list After this function, free list with free instead of listFreeS
Note: this function creates a new list, so void *** is not needed. Unlike iList functions.
| list |
Definition at line 56110 of file libsheepy.c.


| void ** listReverse | ( | void ** | list | ) |
list Reverse create index list and reverse list, the last element is the first element of the new list
| list |
Definition at line 56145 of file libsheepy.c.


| void ** iListReverse | ( | void *** | list | ) |
list Reverse reverse list, the last element is the first element of the list
| list | (this parameter is reallocated) |
Definition at line 56182 of file libsheepy.c.

| void ** listCatF | ( | void ** | paramType, |
| ... | |||
| ) |
list Cat
| arbitrary | list of lists seperated by commas |
Definition at line 56203 of file libsheepy.c.

| void ** listAppend | ( | void *** | list1, |
| void ** | list2 | ||
| ) |
list Append
(like iListAppendS)
Append list2 at the end of list1 by copying the pointers from list2 to list1. After this function, free list2 with free instead of listFreeS
list1 is reallocated to add extra space
| list1 | (this parameter is reallocated) |
| list2 |
Definition at line 56240 of file libsheepy.c.


| void ** listAdd | ( | void ** | list1, |
| void ** | list2 | ||
| ) |
list Add add list1 and list2 in a new list
| list1 | |
| list2 |
Definition at line 56308 of file libsheepy.c.


| void ** listSlice | ( | void ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Slice
(like iListCopyS)
return new list with element pointers from start and end in list negative indexes are allowed
Note: this function creates a new list, so void *** is not needed. Unlike iList functions.
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 56370 of file libsheepy.c.


| void ** iListSlice | ( | void *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Slice return list with elements from start and end in list negative indexes are allowed
| list | (this parameter is reallocated) |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 56441 of file libsheepy.c.

| void ** listInsert | ( | void ** | list, |
| int64_t | index, | ||
| void ** | toInsert | ||
| ) |
list Insert
insert list in list at index
return new list with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | |
| index | in list |
| toInsert | list |
Definition at line 56522 of file libsheepy.c.

| void ** iListInsert | ( | void *** | list, |
| int64_t | index, | ||
| void ** | toInsert | ||
| ) |
list Insert
insert list in list at index After this function, free toInsert with free instead of listFreeS
return list with toInsert at index negative indexes are allowed index -1 is the end of the array and is equivalent to index len
| list | (this parameter is reallocated) |
| index | in list |
| toInsert | list |
Definition at line 56602 of file libsheepy.c.

| void ** listDel | ( | void ** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Delete return new list without elements from start and end in list negative indexes are allowed
| list | |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 56684 of file libsheepy.c.

| void ** iListDel | ( | void *** | list, |
| int64_t | start, | ||
| int64_t | end | ||
| ) |
list Delete return list without elements from start and end in list negative indexes are allowed
| list | (this parameter is reallocated) |
| start | index, must be in the list |
| end | index, must be in the list |
Definition at line 56761 of file libsheepy.c.

| int ringInit | ( | void * | ring, |
| int | maxCount | ||
| ) |
list Sort duplicate list and sort
| list |
| list |
| 2 | lists |
| list | element |
efficiently finds the index of element in list the list has be sorted with for example listSortS
| list | element to search |
| list |
| list |
| list |
| list |
the ring is empty after this function
a pointer to staticArray is also valid the array is empty after this function
| ring | pointer to initialize |
| maxCount | for this ring type |
Definition at line 57082 of file libsheepy.c.
| int ringEmpty | ( | void * | ring | ) |
empty ring Allocated buffers in the list must be freed before running staticArrayEmpty
Definition at line 57104 of file libsheepy.c.
| int ringIsEmpty | ( | void * | ring | ) |
1 when empty 0 not empty -1 error
Definition at line 57121 of file libsheepy.c.

| int ringIsFull | ( | void * | ring | ) |
1 when full 0 not full -1 error
Definition at line 57137 of file libsheepy.c.

| ssize_t ringCount | ( | void * | ring | ) |
| i64 ringPush | ( | void * | ring | ) |
push element to ring (only increases last, use ringSend) use ringLast to access the element
Definition at line 57186 of file libsheepy.c.

| int ringPop | ( | void * | ring | ) |
pop element from ring (only decreases last)
Definition at line 57215 of file libsheepy.c.

| i64 ringPrepend | ( | void * | ring | ) |
prepend element to ring (only decreases head) use ringFirst to access the element
Definition at line 57249 of file libsheepy.c.

| int ringDequeue | ( | void * | ring | ) |
dequeue element from ring (only increases head, use ringRecv)
Definition at line 57282 of file libsheepy.c.

| bool fiberAdd | ( | void * | ctx, |
| int | thisSlot, | ||
| fiberFT | func | ||
| ) |
add new fiber
| ctx | context for the fiber at thisSlot |
| thisSlot | reserved slot for this fiber |
| func | fiber function |
Definition at line 57321 of file libsheepy.c.
| bool fiberPrepend | ( | void * | ctx, |
| int | thisSlot, | ||
| fiberFT | func | ||
| ) |
add new fiber and start immediately after next yield
| ctx | context for the fiber at thisSlot |
| thisSlot | reserved slot for this fiber |
| func | fiber function |
Definition at line 57344 of file libsheepy.c.
| void scheduler | ( | void | ) |
Schedule fibers.
fiber usage
Definition at line 57358 of file libsheepy.c.

| uint64_t getMonotonicTime | ( | void | ) |
end bitfield
Definition at line 57411 of file libsheepy.c.

| int nanoSleepF | ( | uint64_t | time | ) |
nanosleep
sleep nanoseconds
| time | in nanosceonds |
Definition at line 57427 of file libsheepy.c.
| void initLibsheepyF | ( | const char * | progPath, |
| initLibsheepyObjectP | initF | ||
| ) |
initialize libsheepy (optional, for debug)
initialize segfault handler for crash debug the segfault handler prints the line and file where the segfault occured
initialize the fibers initialize libsheepyObject
Definition at line 1579 of file libsheepy.c.
| char** btrace | ( | void | ) |
generate backtrace the program has to be linked the -rdynamic option for btrace to work btrace can backtrace 50 functions at most.
Definition at line 55472 of file libsheepy.c.


| const bool TRUE = true |
type bool true (glibc true is not bool), for use in generics
Definition at line 862 of file libsheepy.c.
| const bool FALSE = false |
type bool false (glibc true is not bool), for use in generics
Definition at line 864 of file libsheepy.c.
| bool btraceCfg = true |
backtrace in error messages is enabled by default
Definition at line 867 of file libsheepy.c.
| jmp_buf tryJumpBuffers[maxTryThrowCount] |
setjmp buffers for try/throw,throwV macros
Definition at line 872 of file libsheepy.c.
| uint64_t logMask = 0xFFFFFFFFFFFFFFFF |
variable to control which group logs to show, all logs are enabled by default (0xFFFFFFFFFFFFFFFF)
Definition at line 974 of file libsheepy.c.
| uint16_t ch |
Definition at line 19689 of file libsheepy.c.
Definition at line 19690 of file libsheepy.c.
| const uint8_t codeSzUTF8[256] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1} |
Definition at line 31675 of file libsheepy.c.
| fibersT fibers |
fibers holds the necessary information to schedule fibers
data for fiber system
Definition at line 57307 of file libsheepy.c.
1.8.13