94 if (((Scan + 1) < Linend) &&
95 (*Scan ==
'-' || *Scan ==
'+') &&
96 (isdigit(this->
getChar(0)) || *Scan ==
'.') &&
97 (toupper(*(Scan - 1)) ==
'E'))
101 while (Scan < Linend)
120 if (Compound == 1 && this->
getLength() == 1)
124 else if (Compound > 1)
133 for (i = this->
getLength() ; i != 0; i-- )
135 if (!isdigit(*Scan) &&
143 toupper(*Scan) ==
'E')
148 if (*Scan !=
'+' && *Scan !=
'-')
173 else if (Compound == 1 && *(Scan - 1) ==
'.')
205 if (ChkLen == 0 && Len2 == 0)
209 else if (Len1 == 0L ||
238 if (chkLen == 0 && len2 == 0)
246 if (len1 == 0 || (len2 < chkLen) || (len1 < len2))
279 if (Length1 > Length2)
285 Remainder = Length1 - Lead;
292 Remainder = Length2 - Lead;
298 if (String1[i] != String2[i])
305 if (MisMatch == 0 && Remainder != 0)
308 for (i = 0; i < Remainder; i++)
310 if (String1[i] != PadChar)
312 MisMatch = Lead + i + 1;
354 if (length1 > length2)
360 _remainder = length1 - lead;
367 _remainder = length2 - lead;
371 for (i = 0; i < lead; i++)
374 if (toupper(string1[i]) != toupper(string2[i]))
380 for (i = 0; i < _remainder; i++)
383 if (toupper(string1[i]) != padChar)
412 Retval = OREF_NULLSTRING;
601 for (i = 0; i < matches; i++)
603 matchPos =
pos(needle, _start);
608 copyLength = (matchPos - 1) - _start;
612 memcpy(copyPtr, source + _start, copyLength);
613 copyPtr += copyLength;
617 memcpy(copyPtr, newPtr, newLength);
618 copyPtr += newLength;
620 _start = matchPos + needleLength - 1;
625 memcpy(copyPtr, source + _start, this->
getLength() - _start);
671 for (i = 0; i < matches; i++)
678 copyLength = (matchPos - 1) - _start;
682 memcpy(copyPtr, source + _start, copyLength);
683 copyPtr += copyLength;
687 memcpy(copyPtr, newPtr, newLength);
688 copyPtr += newLength;
690 _start = matchPos + needleLength - 1;
695 memcpy(copyPtr, source + _start, this->
getLength() - _start);
777 const char *OutTable;
778 size_t OutTableLength;
782 size_t InTableLength;
809 if (startPos >
getLength() || range == 0)
822 while (ScanLength-- != 0)
826 if (tablei != OREF_NULLSTRING)
833 Position = ((size_t)ch) & 0xFF;
835 if (Position != (
size_t)(-1))
837 if (Position < OutTableLength)
840 *ScanPtr = *(OutTable + Position);
844 *ScanPtr = (char)PadChar;
902 if ((offset + len - 1) > other->
getLength())
946 if ((offset + len - 1) > other->
getLength())
1036 if (_matchChar == matchSet->
getChar(i))
1069 _matchChar = toupper((
int)_matchChar);
1075 if (_matchChar == toupper((
int)matchSet->
getChar(i)))
1123 if (_start > myLength)
1128 if (_start > otherLength)
1145 if (myLength == otherLength)
1149 else if (myLength > otherLength)
1158 else if (result > 0)
1212 if (_start > myLength)
1217 if (_start > otherLength)
1234 if (myLength == otherLength)
1238 else if (myLength > otherLength)
1247 else if (result > 0)
void reportException(wholenumber_t error)
RexxInteger * new_integer(wholenumber_t v)
codepoint_t optionalPadArgument(RexxObject *o, codepoint_t d, size_t p)
RexxString * stringArgument(RexxObject *object, RexxString *kind, size_t position)
const int MAX_SYMBOL_LENGTH
size_t optionalPositive(RexxObject *o, size_t d, RexxString *kind, size_t p)
size_t optionalLengthArgument(RexxObject *o, size_t d, size_t p)
char optionalOptionArgument(RexxObject *o, char d, size_t p)
size_t optionalPositionArgument(RexxObject *o, size_t d, size_t p)
RexxString * optionalStringArgument(RexxObject *o, RexxString *d, RexxString *kind, size_t p)
void requiredArgument(RexxObject *object, RexxString *kind, size_t position)
#define Error_Incorrect_method_position
#define Error_Incorrect_method_length
RexxString * raw_string(stringsize_t l)
RexxString * new_string(const char *s, stringsize_t l)
#define STRING_COMPOUND_NAME
#define STRING_LITERAL_DOT
#define STRING_BAD_VARIABLE
stringsize_t positionArgument(RexxObject *argument, size_t position)
static const wholenumber_t MAX_WHOLENUMBER
static wholenumber_t maxVal(wholenumber_t n1, wholenumber_t n2)
static wholenumber_t minVal(wholenumber_t n1, wholenumber_t n2)
stringsize_t requiredNonNegative(RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
static bool isSymbolCharacter(codepoint_t ch)
size_t lastPos(RexxString *needle, size_t start)
RexxString * changeStr(RexxString *, RexxString *, RexxInteger *)
RexxInteger * caselessLastPosRexx(RexxString *, RexxInteger *, RexxInteger *)
RexxString * translate(RexxString *, RexxString *, RexxString *, RexxInteger *, RexxInteger *)
bool primitiveMatch(stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
RexxString * upperRexx(RexxInteger *, RexxInteger *)
size_t caselessPos(RexxString *, size_t)
size_t pos(RexxString *, size_t)
RexxInteger * abbrev(RexxString *, RexxInteger *)
RexxInteger * caselessMatchChar(RexxInteger *position_, RexxString *matchSet)
const char * getStringData()
RexxInteger * verify(RexxString *, RexxString *, RexxInteger *, RexxInteger *)
RexxInteger * caselessMatch(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
RexxString * caselessChangeStr(RexxString *, RexxString *, RexxInteger *)
RexxInteger * caselessPosRexx(RexxString *, RexxInteger *, RexxInteger *)
RexxInteger * match(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
RexxInteger * caselessCountStrRexx(RexxString *)
RexxInteger * lastPosRexx(RexxString *, RexxInteger *, RexxInteger *)
RexxInteger * compareToRexx(RexxString *other, RexxInteger *start_, RexxInteger *len_)
RexxInteger * compare(RexxString *, RexxString *)
RexxInteger * caselessCompare(RexxString *, RexxString *)
RexxInteger * matchChar(RexxInteger *position_, RexxString *matchSet)
RexxObject * dataType(RexxString *)
size_t caselessLastPos(RexxString *needle, size_t start)
RexxInteger * caselessCompareToRexx(RexxString *other, RexxInteger *start_, RexxInteger *len_)
RexxInteger * posRexx(RexxString *, RexxInteger *, RexxInteger *)
RexxString * copies(RexxInteger *)
RexxInteger * primitiveCompareTo(RexxString *other, stringsize_t start, stringsize_t len)
RexxInteger * countStrRexx(RexxString *)
RexxInteger * caselessAbbrev(RexxString *, RexxInteger *)
RexxInteger * primitiveCaselessCompareTo(RexxString *other, stringsize_t start, stringsize_t len)
bool primitiveCaselessMatch(stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
static size_t pos(const char *stringData, size_t haystack_length, RexxString *needle, size_t _start, size_t _range)
static RexxObject * dataType(RexxString *String, char Option)
static size_t memPos(const char *string, size_t length, char target)
static size_t caselessLastPos(const char *stringData, size_t haystackLen, RexxString *needle, size_t _start, size_t range)
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 countStr(const char *hayStack, size_t hayStackLength, RexxString *needle)
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 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)