44 #ifndef Included_StringUtil
45 #define Included_StringUtil
55 static size_t pos(
const char *stringData,
size_t haystack_length,
RexxString *needle,
size_t _start,
size_t _range);
56 static size_t caselessPos(
const char *stringData,
size_t haystack_length,
RexxString *needle,
size_t _start,
size_t _range);
58 static size_t lastPos(
const char *stringData,
size_t hastackLen,
RexxString *needle,
size_t _start,
size_t _range);
59 static const char *
lastPos(
const char *needle,
size_t needleLen,
const char *haystack,
size_t haystackLen);
63 static size_t caselessLastPos(
const char *stringData,
size_t haystackLen,
RexxString *needle,
size_t _start,
size_t range);
64 static const char *
caselessLastPos(
const char *needle,
size_t needleLen,
const char *haystack,
size_t haystackLen);
67 static char packByte(
const char *String);
71 static size_t chGetSm(
char *Destination,
const char *Source,
size_t Length,
size_t Count,
const char *Set,
size_t *ScannedSize);
72 static size_t validateSet(
const char *String,
size_t Length,
const char *Set,
int Modulus,
bool Hex);
74 static int valSet(
const char *String,
size_t Length,
const char *Set,
int Modulus,
size_t *PackedSize );
75 static const char *
memcpbrk(
const char *String,
const char *Set,
size_t Length);
81 static size_t countStr(
const char *hayStack,
size_t hayStackLength,
RexxString *needle);
83 static size_t memPos(
const char *
string,
size_t length,
char target);
93 static const char *
locateSeparator(
const char *start,
const char *end,
const char *sepData,
size_t sepLength);
100 if (ch == *charSet++)
size_t RexxEntry StringLength(RexxThreadContext *c, RexxStringObject s)
static void unpackNibble(int Val, char *p)
static size_t validateSet(const char *String, size_t Length, const char *Set, int Modulus, bool Hex)
static size_t pos(const char *stringData, size_t haystack_length, RexxString *needle, size_t _start, size_t _range)
static RexxString * packHex(const char *String, size_t StringLength)
static const char * memcpbrk(const char *String, const char *Set, size_t Length)
static char packByte2(const char *Byte)
static RexxInteger * caselessWordPos(const char *data, size_t length, RexxString *phrase, RexxInteger *pstart)
static int valSet(const char *String, size_t Length, const char *Set, int Modulus, size_t *PackedSize)
static RexxInteger * wordIndex(const char *data, size_t length, RexxInteger *position)
static RexxArray * subWords(const char *data, size_t length, RexxInteger *position, RexxInteger *plength)
static RexxObject * dataType(RexxString *String, char Option)
static bool checkIsASCII(const char *s, size_t length)
static size_t memPos(const char *string, size_t length, char target)
static void skipBlanks(const char **String, size_t *StringLength)
static size_t caselessLastPos(const char *stringData, size_t haystackLen, RexxString *needle, size_t _start, size_t range)
static size_t wordCount(const char *String, size_t StringLength)
static char packNibble(const char *String)
static RexxString * subWord(const char *data, size_t length, RexxInteger *position, RexxInteger *plength)
static void skipNonBlanks(const char **String, size_t *StringLength)
static int caselessCompare(const char *, const char *, size_t)
static RexxInteger * lastPosRexx(const char *stringData, size_t haystackLen, RexxString *needle, RexxInteger *_start, RexxInteger *_range)
static size_t caselessPos(const char *stringData, size_t haystack_length, RexxString *needle, size_t _start, size_t _range)
static size_t nextWord(const char **String, size_t *StringLength, const char **NextString)
static RexxInteger * wordPos(const char *data, size_t length, RexxString *phrase, RexxInteger *pstart)
static bool matchCharacter(char ch, const char *charSet, size_t len)
static RexxInteger * wordLength(const char *data, size_t length, RexxInteger *position)
static RexxArray * makearray(const char *start, size_t length, RexxString *separator)
static int hexDigitToInt(char ch)
static size_t chGetSm(char *Destination, const char *Source, size_t Length, size_t Count, const char *Set, size_t *ScannedSize)
static size_t countStr(const char *hayStack, size_t hayStackLength, RexxString *needle)
static const char * locateSeparator(const char *start, const char *end, const char *sepData, size_t sepLength)
static size_t caselessCountStr(const char *hayStack, size_t hayStackLength, RexxString *needle)
static RexxInteger * verify(const char *data, size_t stringLen, RexxString *ref, RexxString *option, RexxInteger *_start, RexxInteger *range)
static RexxString * word(const char *data, size_t length, RexxInteger *position)
static RexxString * subchar(const char *stringData, size_t stringLength, RexxInteger *positionArg)
static char packByte(const char *String)
static RexxString * substr(const char *, size_t, RexxInteger *, RexxInteger *, RexxString *)
static size_t lastPos(const char *stringData, size_t hastackLen, RexxString *needle, size_t _start, size_t _range)
static RexxInteger * posRexx(const char *stringData, size_t length, RexxString *needle, RexxInteger *pstart, RexxInteger *range)
static RexxArray * words(const char *data, size_t length)