ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

RexxString Class Reference

#include <StringClass.hpp>

Inheritance diagram for RexxString:
[legend]
Collaboration diagram for RexxString:
[legend]

Public Member Functions

void * operator new (size_t size, void *ptr)
 
 RexxString ()
 
 RexxString (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *envelope)
 
RexxObjectunflatten (RexxEnvelope *)
 
virtual HashCode hash ()
 
virtual HashCode getHashValue ()
 
HashCode getStringHash ()
 
HashCode getObjectHashCode ()
 
bool numberValue (wholenumber_t &result, size_t precision)
 
bool numberValue (wholenumber_t &result)
 
bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
bool unsignedNumberValue (stringsize_t &result)
 
bool doubleValue (double &result)
 
RexxNumberStringnumberString ()
 
RexxIntegerintegerValue (size_t)
 
RexxStringmakeString ()
 
RexxArraymakeArray ()
 
RexxStringprimitiveMakeString ()
 
void copyIntoTail (RexxCompoundTail *buffer)
 
RexxStringstringValue ()
 
bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
bool isEqual (RexxObject *)
 
bool primitiveIsEqual (RexxObject *)
 
bool primitiveCaselessIsEqual (RexxObject *)
 
wholenumber_t strictComp (RexxObject *)
 
wholenumber_t comp (RexxObject *)
 
wholenumber_t compareTo (RexxObject *)
 
RexxIntegerequal (RexxObject *)
 
RexxIntegerstrictEqual (RexxObject *)
 
RexxIntegernotEqual (RexxObject *)
 
RexxIntegerstrictNotEqual (RexxObject *)
 
RexxIntegerisGreaterThan (RexxObject *)
 
RexxIntegerisLessThan (RexxObject *)
 
RexxIntegerisGreaterOrEqual (RexxObject *)
 
RexxIntegerisLessOrEqual (RexxObject *)
 
RexxIntegerstrictGreaterThan (RexxObject *)
 
RexxIntegerstrictLessThan (RexxObject *)
 
RexxIntegerstrictGreaterOrEqual (RexxObject *)
 
RexxIntegerstrictLessOrEqual (RexxObject *)
 
size_t copyData (size_t, char *, size_t)
 
RexxObjectlengthRexx ()
 
RexxStringconcatRexx (RexxObject *)
 
RexxStringconcat (RexxString *)
 
RexxStringconcatToCstring (const char *)
 
RexxStringconcatWithCstring (const char *)
 
RexxStringconcatBlank (RexxObject *)
 
bool checkLower ()
 
RexxStringupper ()
 
RexxStringupper (size_t, size_t)
 
RexxStringupperRexx (RexxInteger *, RexxInteger *)
 
RexxStringlower ()
 
RexxStringlower (size_t, size_t)
 
RexxStringlowerRexx (RexxInteger *, RexxInteger *)
 
RexxStringstringTrace ()
 
void setNumberString (RexxObject *)
 
RexxStringconcatWith (RexxString *, char)
 
RexxObjectplus (RexxObject *right)
 
RexxObjectminus (RexxObject *right)
 
RexxObjectmultiply (RexxObject *right)
 
RexxObjectdivide (RexxObject *right)
 
RexxObjectintegerDivide (RexxObject *right)
 
RexxObjectremainder (RexxObject *right)
 
RexxObjectpower (RexxObject *right)
 
RexxObjectabs ()
 
RexxObjectsign ()
 
RexxObjectnotOp ()
 
RexxObjectoperatorNot (RexxObject *)
 
RexxObjectandOp (RexxObject *)
 
RexxObjectorOp (RexxObject *)
 
RexxObjectxorOp (RexxObject *)
 
RexxObjectMax (RexxObject **args, size_t argCount)
 
RexxObjectMin (RexxObject **args, size_t argCount)
 
RexxObjecttrunc (RexxInteger *decimals)
 
RexxObjectfloor ()
 
RexxObjectceiling ()
 
RexxObjectround ()
 
RexxObjectformat (RexxObject *Integers, RexxObject *Decimals, RexxObject *MathExp, RexxObject *ExpTrigger)
 
RexxObjectisInteger ()
 
RexxObjectlogicalOperation (RexxObject *, RexxObject *, unsigned int)
 
RexxStringextract (size_t offset, size_t sublength)
 
RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
RexxObjectgetValue (RexxActivation *)
 
RexxObjectgetValue (RexxVariableDictionary *)
 
RexxObjectgetRealValue (RexxActivation *)
 
RexxObjectgetRealValue (RexxVariableDictionary *)
 
RexxStringcenter (RexxInteger *, RexxString *)
 
RexxStringdelstr (RexxInteger *, RexxInteger *)
 
RexxStringinsert (RexxString *, RexxInteger *, RexxInteger *, RexxString *)
 
RexxStringleft (RexxInteger *, RexxString *)
 
RexxStringoverlay (RexxString *, RexxInteger *, RexxInteger *, RexxString *)
 
RexxStringreplaceAt (RexxString *, RexxInteger *, RexxInteger *, RexxString *)
 
RexxStringreverse ()
 
RexxStringright (RexxInteger *, RexxString *)
 
RexxStringstrip (RexxString *, RexxString *)
 
RexxStringsubstr (RexxInteger *, RexxInteger *, RexxString *)
 
RexxStringsubchar (RexxInteger *)
 
RexxStringdelWord (RexxInteger *, RexxInteger *)
 
RexxStringspace (RexxInteger *, RexxString *)
 
RexxStringsubWord (RexxInteger *, RexxInteger *)
 
RexxArraysubWords (RexxInteger *, RexxInteger *)
 
RexxStringword (RexxInteger *)
 
RexxIntegerwordIndex (RexxInteger *)
 
RexxIntegerwordLength (RexxInteger *)
 
RexxIntegerwordPos (RexxString *, RexxInteger *)
 
RexxIntegercaselessWordPos (RexxString *, RexxInteger *)
 
RexxIntegerwords ()
 
RexxStringchangeStr (RexxString *, RexxString *, RexxInteger *)
 
RexxStringcaselessChangeStr (RexxString *, RexxString *, RexxInteger *)
 
RexxIntegerabbrev (RexxString *, RexxInteger *)
 
RexxIntegercaselessAbbrev (RexxString *, RexxInteger *)
 
RexxIntegercompare (RexxString *, RexxString *)
 
RexxIntegercaselessCompare (RexxString *, RexxString *)
 
RexxStringcopies (RexxInteger *)
 
RexxObjectdataType (RexxString *)
 
RexxIntegerlastPosRexx (RexxString *, RexxInteger *, RexxInteger *)
 
RexxIntegercaselessLastPosRexx (RexxString *, RexxInteger *, RexxInteger *)
 
size_t lastPos (RexxString *needle, size_t start)
 
size_t caselessLastPos (RexxString *needle, size_t start)
 
const char * caselessLastPos (const char *needle, size_t needleLen, const char *haystack, size_t haystackLen)
 
RexxIntegerposRexx (RexxString *, RexxInteger *, RexxInteger *)
 
RexxIntegercaselessPosRexx (RexxString *, RexxInteger *, RexxInteger *)
 
size_t pos (RexxString *, size_t)
 
size_t caselessPos (RexxString *, size_t)
 
RexxStringtranslate (RexxString *, RexxString *, RexxString *, RexxInteger *, RexxInteger *)
 
RexxIntegerverify (RexxString *, RexxString *, RexxInteger *, RexxInteger *)
 
RexxIntegercountStrRexx (RexxString *)
 
RexxIntegercaselessCountStrRexx (RexxString *)
 
size_t caselessCountStr (RexxString *)
 
RexxStringbitAnd (RexxString *, RexxString *)
 
RexxStringbitOr (RexxString *, RexxString *)
 
RexxStringbitXor (RexxString *, RexxString *)
 
RexxStringb2x ()
 
RexxStringc2d (RexxInteger *)
 
RexxStringc2x ()
 
RexxStringencodeBase64 ()
 
RexxStringdecodeBase64 ()
 
RexxStringd2c (RexxInteger *)
 
RexxStringd2x (RexxInteger *)
 
RexxStringx2b ()
 
RexxStringx2c ()
 
RexxStringx2d (RexxInteger *)
 
RexxStringx2dC2d (RexxInteger *, bool)
 
RexxIntegermatch (RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
 
RexxIntegercaselessMatch (RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
 
bool primitiveMatch (stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
 
bool primitiveCaselessMatch (stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
 
RexxIntegermatchChar (RexxInteger *position_, RexxString *matchSet)
 
RexxIntegercaselessMatchChar (RexxInteger *position_, RexxString *matchSet)
 
RexxIntegercompareToRexx (RexxString *other, RexxInteger *start_, RexxInteger *len_)
 
RexxIntegercaselessCompareToRexx (RexxString *other, RexxInteger *start_, RexxInteger *len_)
 
RexxIntegerprimitiveCompareTo (RexxString *other, stringsize_t start, stringsize_t len)
 
RexxIntegerprimitiveCaselessCompareTo (RexxString *other, stringsize_t start, stringsize_t len)
 
RexxIntegerequals (RexxString *other)
 
RexxIntegercaselessEquals (RexxString *other)
 
RexxArraymakeArrayRexx (RexxString *)
 
int isSymbol ()
 
size_t getLength ()
 
void setLength (size_t l)
 
void finish (stringsize_t l)
 
const char * getStringData ()
 
char * getWritableData ()
 
void put (size_t s, const void *b, size_t l)
 
void put (size_t s, RexxString *o)
 
void set (size_t s, int c, size_t l)
 
char getChar (size_t p)
 
char putChar (size_t p, char c)
 
bool upperOnly ()
 
bool hasLower ()
 
void setUpperOnly ()
 
void setHasLower ()
 
bool nonNumeric ()
 
void setNonNumeric ()
 
bool strCompare (const char *s)
 
bool strCaselessCompare (const char *s)
 
bool memCompare (const char *s, size_t l)
 
bool memCompare (RexxString *other)
 
void memCopy (char *s)
 
void toRxstring (CONSTRXSTRING &r)
 
void toRxstring (RXSTRING &r)
 
void copyToRxstring (RXSTRING &r)
 
bool endsWith (char c)
 
RexxNumberStringcreateNumberString ()
 
RexxNumberStringfastNumberString ()
 
int sortCompare (RexxString *other)
 
int sortCaselessCompare (RexxString *other)
 
int sortCompare (RexxString *other, size_t startCol, size_t colLength)
 
int sortCaselessCompare (RexxString *other, size_t startCol, size_t colLength)
 
RexxStringnewRexx (RexxObject **, size_t)
 
- Public Member Functions inherited from RexxObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t)
 
void * operator new (size_t size, void *objectPtr)
 
void operator delete (void *, void *)
 
void operator delete (void *)
 
void operator delete (void *, RexxClass *)
 
void operator delete (void *, RexxClass *, RexxObject **, size_t)
 
RexxObjectnewRexx (RexxObject **arguments, size_t argCount)
 
RexxObjectnewObject ()
 
 operator RexxInternalObject * ()
 
 RexxObject ()
 
 RexxObject (RESTORETYPE restoreType)
 
void initializeNewObject (size_t size, size_t mark, void *vft, RexxBehaviour *b)
 
void initializeNewObject (size_t mark, void *vft, RexxBehaviour *b)
 
virtual ~RexxObject ()
 
virtual RexxObjectdefMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
virtual RexxStringdefaultName ()
 
virtual RexxObjectunknown (RexxString *msg, RexxArray *args)
 
virtual RexxIntegerhasMethod (RexxString *msg)
 
bool hasUninitMethod ()
 
RexxObjectinit ()
 
void uninit ()
 
RexxObjectcopy ()
 
RexxStringrequestString ()
 
RexxStringrequestStringNoNOSTRING ()
 
RexxIntegerrequestInteger (size_t)
 
bool requestNumber (wholenumber_t &, size_t)
 
bool requestUnsignedNumber (stringsize_t &, size_t)
 
RexxArrayrequestArray ()
 
RexxStringrequiredString (size_t)
 
RexxStringrequiredString (const char *)
 
RexxStringrequiredString ()
 
RexxIntegerrequiredInteger (size_t, size_t)
 
wholenumber_t requiredNumber (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredPositive (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredNonNegative (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
bool isInstanceOf (RexxClass *)
 
RexxObjectisInstanceOfRexx (RexxClass *)
 
RexxMethodinstanceMethod (RexxString *)
 
RexxSupplierinstanceMethods (RexxClass *)
 
RexxMethodinstanceMethodRexx (RexxString *)
 
RexxSupplierinstanceMethodsRexx (RexxClass *)
 
RexxStringobjectName ()
 
RexxObjectobjectNameEquals (RexxObject *)
 
RexxClassclassObject ()
 
RexxObjectsetMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
RexxObjectunsetMethod (RexxString *)
 
RexxObjectrequestRexx (RexxString *)
 
RexxMessagestart (RexxObject **, size_t)
 
RexxMessagestartWith (RexxObject *, RexxArray *)
 
RexxObjectsend (RexxObject **, size_t)
 
RexxObjectsendWith (RexxObject *, RexxArray *)
 
RexxMessagestartCommon (RexxObject *message, RexxObject **arguments, size_t argCount)
 
RexxStringoref ()
 
RexxObjectpmdict ()
 
RexxObjectrun (RexxObject **, size_t)
 
void messageSend (RexxString *, RexxObject **, size_t, ProtectedObject &)
 
void messageSend (RexxString *, RexxObject **, size_t, RexxObject *, ProtectedObject &)
 
RexxMethodcheckPrivate (RexxMethod *)
 
void processUnknown (RexxString *, RexxObject **, size_t, ProtectedObject &)
 
void processProtectedMethod (RexxString *, RexxMethod *, RexxObject **, size_t, ProtectedObject &)
 
void sendMessage (RexxString *, RexxArray *, ProtectedObject &)
 
void sendMessage (RexxString *message, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject **args, size_t argCount, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject *argument1, ProtectedObject &result)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
RexxObjectsendMessage (RexxString *, RexxArray *)
 
RexxObjectsendMessage (RexxString *message)
 
RexxObjectsendMessage (RexxString *message, RexxObject **args, size_t argCount)
 
RexxObjectsendMessage (RexxString *message, RexxObject *argument1)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectdefMethods (RexxDirectory *)
 
void setObjectVariable (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectgetObjectVariable (RexxString *)
 
RexxObjectgetObjectVariable (RexxString *, RexxObject *)
 
void addObjectVariables (RexxVariableDictionary *)
 
void copyObjectVariables (RexxObject *newObject)
 
RexxObjectsuperScope (RexxObject *)
 
RexxMethodsuperMethod (RexxString *, RexxObject *)
 
RexxObjectmdict ()
 
RexxObjectsetMdict (RexxObject *)
 
RexxBehaviourbehaviourObject ()
 
const char * idString ()
 
RexxStringid ()
 
RexxMethodmethodLookup (RexxString *name)
 
RexxVariableDictionarygetObjectVariables (RexxObject *)
 
void guardOn (RexxActivity *activity, RexxObject *scope)
 
void guardOff (RexxActivity *activity, RexxObject *scope)
 
RexxObjectequal (RexxObject *)
 
RexxObjectnotEqual (RexxObject *other)
 
RexxObjectstrictEqual (RexxObject *)
 
RexxObjectstrictNotEqual (RexxObject *other)
 
RexxIntegeridentityHashRexx ()
 
RexxObjecthashCode ()
 
RexxStringstringRexx ()
 
RexxStringconcatRexx (RexxObject *)
 
RexxStringconcatBlank (RexxObject *)
 
RexxObjectmakeStringRexx ()
 
RexxObjectmakeArrayRexx ()
 
RexxStringdefaultNameRexx ()
 
RexxObjectcopyRexx ()
 
RexxObjectunknownRexx (RexxString *, RexxArray *)
 
RexxObjecthasMethodRexx (RexxString *)
 
void * getCSelf ()
 
void * getCSelf (RexxObject *scope)
 
bool equalValue (RexxObject *other)
 
 koper (operator_plus) koper(operator_minus) koper(operator_multiply) koper(operator_divide) koper(operator_integerDivide) koper(operator_remainder) koper(operator_power) koper(operator_abuttal) koper(operator_concat) koper(operator_concatBlank) koper(operator_equal) koper(operator_notEqual) koper(operator_isGreaterThan) koper(operator_isBackslashGreaterThan) koper(operator_isLessThan) koper(operator_isBackslashLessThan) koper(operator_isGreaterOrEqual) koper(operator_isLessOrEqual) koper(operator_strictEqual) koper(operator_strictNotEqual) koper(operator_strictGreaterThan) koper(operator_strictBackslashGreaterThan) koper(operator_strictLessThan) koper(operator_strictBackslashLessThan) koper(operator_strictGreaterOrEqual) koper(operator_strictLessOrEqual) koper(operator_lessThanGreaterThan) koper(operator_greaterThanLessThan) koper(operator_and) koper(operator_or) koper(operator_xor) koper(operator_not) RexxVariableDictionary *objectVariables
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
HashCode identityHash ()
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 

Static Public Member Functions

static RexxStringnewString (const char *, size_t)
 
static RexxStringrawString (size_t)
 
static RexxStringnewUpperString (const char *, stringsize_t)
 
static RexxStringnewString (double d)
 
static RexxStringnewString (double d, size_t precision)
 
static RexxStringnewProxy (const char *)
 
static void createInstance ()
 
- Static Public Member Functions inherited from RexxObject
static void decodeMessageName (RexxObject *target, RexxObject *message, RexxString *&messageName, RexxObject *&startScope)
 
static void createInstance ()
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Static Public Attributes

static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 
- Static Public Attributes inherited from RexxObject
static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 

Protected Attributes

HashCode hashValue
 
size_t length
 
RexxNumberStringNumberString
 
size_t Attributes
 
char stringData [4]
 

Additional Inherited Members

- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Detailed Description

Definition at line 119 of file StringClass.hpp.

Constructor & Destructor Documentation

◆ RexxString() [1/2]

RexxString::RexxString ( )
inline

Definition at line 122 of file StringClass.hpp.

Referenced by newString(), newUpperString(), and rawString().

◆ RexxString() [2/2]

RexxString::RexxString ( RESTORETYPE  restoreType)
inline

Definition at line 123 of file StringClass.hpp.

Member Function Documentation

◆ abbrev()

◆ abs()

◆ andOp()

◆ b2x()

◆ bitAnd()

◆ bitOr()

◆ bitXor()

◆ c2d()

RexxString * RexxString::c2d ( RexxInteger _length)

Definition at line 593 of file StringClassConversion.cpp.

References x2dC2d().

Referenced by RexxMemory::createImage().

◆ c2x()

RexxString * RexxString::c2x ( )

◆ caselessAbbrev()

◆ caselessChangeStr()

◆ caselessCompare()

RexxInteger * RexxString::caselessCompare ( RexxString other,
RexxString pad 
)

Caseless version of the compare() method.

Parameters
string2The string to compare to.
padThe padding character used for length mismatches.
Returns
0 if the two strings are equal (with padding applied), otherwise it returns the mismatch position.

Definition at line 335 of file StringClassMisc.cpp.

References ARG_ONE, ARG_TWO, getLength(), getStringData(), IntegerZero, new_integer(), optionalPadArgument(), and stringArgument().

Referenced by RexxMemory::createImage().

◆ caselessCompareToRexx()

RexxInteger * RexxString::caselessCompareToRexx ( RexxString other,
RexxInteger start_,
RexxInteger len_ 
)

Do a sorting comparison of two strings.

Parameters
otherThe other compare string.
start_The starting compare position within the target string.
len_The length of the compare substring.
Returns
True if the two regions match, false for any mismatch.

Definition at line 1147 of file StringClassMisc.cpp.

References ARG_ONE, ARG_THREE, ARG_TWO, getLength(), Numerics::maxVal(), optionalLengthArgument(), optionalPositionArgument(), primitiveCaselessCompareTo(), and stringArgument().

Referenced by RexxMemory::createImage().

◆ caselessCountStr()

size_t RexxString::caselessCountStr ( RexxString )

◆ caselessCountStrRexx()

RexxInteger * RexxString::caselessCountStrRexx ( RexxString needle)

◆ caselessEquals()

RexxInteger * RexxString::caselessEquals ( RexxString other)

The string equals() method, which does a strict caseless compare with another string object.

Parameters
otherThe other string object.
Returns
True if the strings are equal, false for inequality.

Definition at line 1029 of file StringClass.cpp.

References primitiveCaselessIsEqual(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ caselessLastPos() [1/2]

const char* RexxString::caselessLastPos ( const char *  needle,
size_t  needleLen,
const char *  haystack,
size_t  haystackLen 
)

◆ caselessLastPos() [2/2]

size_t RexxString::caselessLastPos ( RexxString needle,
size_t  _start 
)

Primitive implementation of a caseless lastpos search.

Parameters
needleThe search needle.
startThe starting position (origin 1).
Returns
Returns the last match position, searching back from the start position. The starting position is the right-most character of the past possible match (as if the string was truncated at start).

Definition at line 519 of file StringClassMisc.cpp.

References StringUtil::caselessLastPos(), getLength(), and getStringData().

◆ caselessLastPosRexx()

RexxInteger * RexxString::caselessLastPosRexx ( RexxString needle,
RexxInteger _start,
RexxInteger _range 
)

Rexx exported version of the caselessLastPos() method.

Parameters
needleThe search needle.
_startThe starting position.
Returns
The match position. 0 means not found.

Definition at line 479 of file StringClassMisc.cpp.

References ARG_ONE, ARG_THREE, ARG_TWO, StringUtil::caselessLastPos(), getLength(), getStringData(), new_integer(), optionalLengthArgument(), optionalPositionArgument(), and stringArgument().

Referenced by RexxMemory::createImage().

◆ caselessMatch()

RexxInteger * RexxString::caselessMatch ( RexxInteger start_,
RexxString other,
RexxInteger offset_,
RexxInteger len_ 
)

Test if regions within two strings match.

Parameters
start_The starting compare position within the target string. This must be within the bounds of the string.
otherThe other compare string.
offset_The starting offset of the compare string. This must be within the string bounds. The default start postion is 1.
len_The length of the compare substring. The length and the offset must specify a valid substring of other. If not specified, this defaults to the substring from the offset to the end of the string.
Returns
True if the two regions match, false for any mismatch.

Definition at line 897 of file StringClassMisc.cpp.

References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, Error_Incorrect_method_length, Error_Incorrect_method_position, getLength(), optionalLengthArgument(), optionalPositionArgument(), positionArgument(), primitiveCaselessMatch(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ caselessMatchChar()

RexxInteger * RexxString::caselessMatchChar ( RexxInteger position_,
RexxString matchSet 
)

Compare a single character at a give position against a set of characters to see if any of the characters is a match.

Parameters
position_The character position
matchSetThe set to compare against.
Returns
true if the character at the give position is any of the characters, false if none of them match.

Definition at line 1025 of file StringClassMisc.cpp.

References ARG_ONE, ARG_TWO, Error_Incorrect_method_position, getChar(), getLength(), positionArgument(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ caselessPos()

size_t RexxString::caselessPos ( RexxString needle,
size_t  _start 
)

Do a primitive level pos() search on a string.

Parameters
needleThe search needle.
_startThe starting position (origin 0)
Returns
The match position (origin 1). Returns 0 for no match.

Definition at line 735 of file StringClassMisc.cpp.

References StringUtil::caselessPos(), getLength(), and getStringData().

Referenced by caselessChangeStr().

◆ caselessPosRexx()

RexxInteger * RexxString::caselessPosRexx ( RexxString needle,
RexxInteger pstart,
RexxInteger range 
)

Do a caseless search for one string in another.

Parameters
needleThe search string.
pstartThe starting position for the search.
rangeA maximum range for the search.
Returns
The index of any match position, or 0 if not found.

Definition at line 700 of file StringClassMisc.cpp.

References ARG_ONE, ARG_THREE, ARG_TWO, StringUtil::caselessPos(), getLength(), getStringData(), new_integer(), optionalLengthArgument(), optionalPositionArgument(), and stringArgument().

Referenced by RexxMemory::createImage().

◆ caselessWordPos()

RexxInteger * RexxString::caselessWordPos ( RexxString phrase,
RexxInteger pstart 
)

Perform a caseless wordpos search on a string object.

Parameters
phraseThe search phrase
pstartThe starting search position.
Returns
The index of the match location.

Definition at line 308 of file StringClassWord.cpp.

References StringUtil::caselessWordPos(), getLength(), and getStringData().

Referenced by RexxMemory::createImage().

◆ ceiling()

RexxObject * RexxString::ceiling ( )

The String class version of the ceiling method.

Returns
The formatted numeric version.

Definition at line 959 of file StringClass.cpp.

References RexxNumberString::ceiling(), Error_Incorrect_method_string_nonumber, fastNumberString(), OREF_NULL, and reportException().

Referenced by RexxMemory::createImage().

◆ center()

RexxString * RexxString::center ( RexxInteger _length,
RexxString pad 
)

◆ changeStr()

◆ checkLower()

bool RexxString::checkLower ( )

Definition at line 1417 of file StringClass.cpp.

References getLength(), getStringData(), setHasLower(), and setUpperOnly().

Referenced by upper().

◆ comp()

◆ compare()

◆ compareTo()

wholenumber_t RexxString::compareTo ( RexxObject other)
virtual

Wrapper around the compareTo() method that validates and extracts integer value.

Parameters
otherThe other comparison object
Returns
-1, 0, 1 depending on the comparison result.

Reimplemented from RexxObject.

Definition at line 570 of file StringClass.cpp.

References RexxObject::compareTo(), compareToRexx(), RexxInteger::getValue(), RexxInternalObject::isBaseClass(), and OREF_NULL.

◆ compareToRexx()

RexxInteger * RexxString::compareToRexx ( RexxString other,
RexxInteger start_,
RexxInteger len_ 
)

Do a sorting comparison of two strings.

Parameters
otherThe other compare string.
start_The starting compare position within the target string.
len_The length of the compare substring.
Returns
True if the two regions match, false for any mismatch.

Definition at line 1061 of file StringClassMisc.cpp.

References ARG_ONE, ARG_THREE, ARG_TWO, getLength(), Numerics::maxVal(), optionalLengthArgument(), optionalPositionArgument(), primitiveCompareTo(), and stringArgument().

Referenced by compareTo(), and RexxMemory::createImage().

◆ concat()

◆ concatBlank()

◆ concatRexx()

◆ concatToCstring()

◆ concatWith()

RexxString * RexxString::concatWith ( RexxString other,
char  between 
)

◆ concatWithCstring()

◆ copies()

◆ copyData()

size_t RexxString::copyData ( size_t  startPos,
char *  buffer,
size_t  bufl 
)

Definition at line 450 of file StringClass.cpp.

References getLength(), and getStringData().

Referenced by StringGet().

◆ copyIntoTail()

void RexxString::copyIntoTail ( RexxCompoundTail buffer)
virtual

◆ copyToRxstring()

void RexxString::copyToRxstring ( RXSTRING r)

Copy a string to an RXSTRING, with appropriate allocation of a new buffer if required.

Parameters
r

Definition at line 1928 of file StringClass.cpp.

References SystemInterpreter::allocateResultMemory(), getLength(), getStringData(), _RXSTRING::strlength, and _RXSTRING::strptr.

◆ countStrRexx()

RexxInteger * RexxString::countStrRexx ( RexxString needle)

◆ createInstance()

void RexxString::createInstance ( )
static

Create initial class object at bootstrap time.

Definition at line 67 of file StringClass.cpp.

References CLASS_CREATE.

Referenced by RexxMemory::createImage().

◆ createNumberString()

◆ d2c()

◆ d2x()

◆ dataType()

RexxObject * RexxString::dataType ( RexxString pType)

◆ decodeBase64()

RexxString * RexxString::decodeBase64 ( )

Reverse the effect of an encodebase64 operation, converting a string in Base64 format into a "normal" character string.

Returns
The converted character string.

Definition at line 126 of file StringClassConversion.cpp.

References Error_Incorrect_method_invbase64, getLength(), getStringData(), getWritableData(), raw_string(), and reportException().

Referenced by RexxMemory::createImage().

◆ delstr()

RexxString * RexxString::delstr ( RexxInteger position,
RexxInteger _length 
)

◆ delWord()

◆ divide()

RexxObject * RexxString::divide ( RexxObject right)

◆ doubleValue()

bool RexxString::doubleValue ( double &  result)
virtual

Reimplemented from RexxObject.

Definition at line 330 of file StringClass.cpp.

References RexxNumberString::doubleValue(), fastNumberString(), OREF_NULL, and strCompare().

Referenced by RexxObject::doubleValue().

◆ encodeBase64()

RexxString * RexxString::encodeBase64 ( )

Convert the character string into the same string with the characters converted into a Base64 encoding.

Returns
The string reformatted into a Base64 encoding.

Definition at line 63 of file StringClassConversion.cpp.

References getLength(), getStringData(), getWritableData(), and raw_string().

Referenced by RexxMemory::createImage().

◆ endsWith()

bool RexxString::endsWith ( char  c)
inline

Definition at line 354 of file StringClass.hpp.

References length, and stringData.

Referenced by RexxVariable::isStem().

◆ equal()

RexxInteger * RexxString::equal ( RexxObject other)

Definition at line 1052 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ equals()

RexxInteger * RexxString::equals ( RexxString other)

The string equals() method, which does a strict compare with another string object.

Parameters
otherThe other string object.
Returns
True if the strings are equal, false for inequality.

Definition at line 1016 of file StringClass.cpp.

References primitiveIsEqual(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ evaluate()

RexxObject * RexxString::evaluate ( RexxActivation context,
RexxExpressionStack stack 
)
virtual

◆ extract()

◆ fastNumberString()

◆ finish()

void RexxString::finish ( stringsize_t  l)
inline

Definition at line 332 of file StringClass.hpp.

References length.

Referenced by FinishBufferString().

◆ flatten()

void RexxString::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxObject.

Definition at line 154 of file StringClass.cpp.

References cleanUpFlatten, flatten_reference, and setUpFlatten.

◆ floor()

RexxObject * RexxString::floor ( )

The String class version of the floor method.

Returns
The formatted numeric version.

Definition at line 941 of file StringClass.cpp.

References Error_Incorrect_method_string_nonumber, fastNumberString(), RexxNumberString::floor(), OREF_NULL, and reportException().

Referenced by RexxMemory::createImage().

◆ format()

RexxObject * RexxString::format ( RexxObject Integers,
RexxObject Decimals,
RexxObject MathExp,
RexxObject ExpTrigger 
)

◆ getChar()

◆ getHashValue()

HashCode RexxString::getHashValue ( )
virtual

Get the primitive hash value of this String object.

Returns
The calculated string hash for the string.

Reimplemented from RexxInternalObject.

Definition at line 95 of file StringClass.cpp.

References getStringHash().

Referenced by RexxInteger::getHashValue(), RexxNumberString::getHashValue(), and hash().

◆ getLength()

size_t RexxString::getLength ( )
inline

Definition at line 330 of file StringClass.hpp.

References length.

Referenced by abbrev(), RexxSource::addCompound(), RexxSource::addText(), RexxMutableBuffer::append(), b2x(), bitAnd(), bitOr(), bitXor(), BufferStringLength(), build(), RexxVariableDictionary::buildCompoundVariable(), RexxCompoundTail::buildTail(), builtin_function_CONDITION(), builtin_function_DATE(), builtin_function_STREAM(), builtin_function_TIME(), builtin_function_VALUE(), builtin_function_XRANGE(), c2x(), RexxActivity::callCommandExit(), RexxActivity::callFunctionExit(), RexxActivity::callQueueNameExit(), caselessAbbrev(), RexxMutableBuffer::caselessChangeStr(), caselessChangeStr(), caselessCompare(), caselessCompareToRexx(), StringUtil::caselessCountStr(), caselessCountStrRexx(), StringUtil::caselessLastPos(), caselessLastPos(), caselessLastPosRexx(), RexxMutableBuffer::caselessMatch(), caselessMatch(), RexxMutableBuffer::caselessMatchChar(), caselessMatchChar(), StringUtil::caselessPos(), caselessPos(), caselessPosRexx(), RexxTarget::caselessSearch(), StringUtil::caselessWordPos(), caselessWordPos(), center(), RexxMutableBuffer::changeStr(), changeStr(), checkLower(), checkPadArgument(), CommandHandlerDispatcher::CommandHandlerDispatcher(), comp(), RexxCompoundTail::compare(), compare(), compareToRexx(), concat(), concatBlank(), concatRexx(), concatToCstring(), concatWith(), concatWithCstring(), copies(), copyData(), RexxInteger::copyIntoTail(), copyIntoTail(), copyToRxstring(), RexxNativeActivation::copyValue(), StringUtil::countStr(), countStrRexx(), RexxCompoundTail::createCompoundName(), createNumberString(), StringUtil::dataType(), RexxActivation::debugPause(), decodeBase64(), delstr(), delWord(), encodeBase64(), RexxInstructionOptions::execute(), RexxSource::extract(), SysFileSystem::extractDirectory(), SysFileSystem::extractExtension(), SysFileSystem::extractFile(), RexxSource::extractSource(), RexxNativeActivation::getContextStem(), RexxVariableDictionary::getDirectVariableRetriever(), getObjectHashCode(), SystemInterpreter::getSourceString(), getStringHash(), RexxVariableDictionary::getVariableRetriever(), RexxMutableBuffer::insert(), insert(), isEqual(), isInteger(), isSymbol(), StringUtil::lastPos(), lastPos(), lastPosRexx(), left(), lengthRexx(), RexxVariableReference::list(), RexxMethod::loadExternalMethod(), RoutineClass::loadExternalRoutine(), logicalValue(), lower(), lowerRexx(), StringUtil::makearray(), makeArrayRexx(), makeString(), RexxMutableBuffer::match(), match(), RexxMutableBuffer::matchChar(), matchChar(), Interpreter::messageNumber(), RexxActivity::messageSubstitution(), RexxMutableBufferClass::newRexx(), numberString(), RexxMutableBuffer::overlay(), overlay(), padArgument(), RexxSource::parseTraceSetting(), StringUtil::pos(), pos(), RexxSource::position(), posRexx(), primitiveCaselessCompareTo(), primitiveCaselessIsEqual(), primitiveCaselessMatch(), primitiveCompareTo(), primitiveIsEqual(), primitiveMatch(), put(), replaceAt(), RexxSource::resolveKeyword(), RexxActivation::resolveStream(), reverse(), right(), RexxTarget::search(), space(), RexxNativeActivation::stemSort(), strictComp(), RexxHashTable::stringGet(), RexxHashTable::stringGetAll(), StringLength(), RexxHashTable::stringPut(), stringTrace(), stringValue(), strip(), subchar(), substr(), subWord(), subWords(), toRxstring(), RexxActivation::traceCompoundValue(), RexxActivation::traceEntry(), RexxActivation::traceOperatorValue(), RexxActivation::traceTaggedValue(), RexxActivation::traceValue(), RexxMutableBuffer::translate(), translate(), truthValue(), RexxDirectory::unknown(), upper(), upperRexx(), SystemInterpreter::validateAddressName(), StringUtil::verify(), verify(), word(), wordIndex(), wordLength(), StringUtil::wordPos(), wordPos(), words(), RexxSource::words(), x2b(), x2c(), and x2dC2d().

◆ getObjectHashCode()

HashCode RexxString::getObjectHashCode ( )

Convert a string returned from an object HashCode() method into a binary hashcode suitable for the hash collections.

Returns
A binary hash code from a string value.

Definition at line 108 of file StringClass.cpp.

References getLength(), and getStringData().

◆ getRealValue() [1/2]

RexxObject * RexxString::getRealValue ( RexxActivation context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 1962 of file StringClass.cpp.

◆ getRealValue() [2/2]

RexxObject * RexxString::getRealValue ( RexxVariableDictionary context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 1972 of file StringClass.cpp.

◆ getStringData()

const char* RexxString::getStringData ( )
inline

Definition at line 333 of file StringClass.hpp.

References stringData.

Referenced by abbrev(), RexxSource::addCompound(), RexxMutableBuffer::append(), b2x(), bitAnd(), bitOr(), bitXor(), RexxCompoundTail::buildTail(), builtin_function_DATE(), builtin_function_QUALIFY(), builtin_function_TIME(), c2x(), RexxActivity::callCommandExit(), RexxActivity::callFunctionExit(), RexxActivation::callMacroSpaceFunction(), RexxActivity::callQueueNameExit(), RexxNativeActivation::callRegisteredRoutine(), caselessAbbrev(), RexxMutableBuffer::caselessChangeStr(), caselessChangeStr(), caselessCompare(), caselessCountStrRexx(), StringUtil::caselessLastPos(), caselessLastPos(), caselessLastPosRexx(), StringUtil::caselessPos(), caselessPos(), caselessPosRexx(), StringUtil::caselessWordPos(), caselessWordPos(), center(), RexxMutableBuffer::changeStr(), changeStr(), checkLower(), CommandHandlerDispatcher::CommandHandlerDispatcher(), comp(), RexxCompoundTail::compare(), compare(), concat(), concatBlank(), concatRexx(), concatToCstring(), concatWith(), concatWithCstring(), copies(), copyData(), RexxInteger::copyIntoTail(), copyIntoTail(), copyToRxstring(), RexxNativeActivation::copyValue(), countStrRexx(), RexxCompoundTail::createCompoundName(), createNumberString(), StringUtil::dataType(), decodeBase64(), RexxObject::defMethod(), delstr(), delWord(), RexxNumberString::doubleValue(), PackageManager::dropRegisteredRoutine(), encodeBase64(), extract(), SysFileSystem::extractDirectory(), SysFileSystem::extractExtension(), SysFileSystem::extractFile(), RoutineClass::fromFile(), RexxActivation::getMacroCode(), GetMessageName(), getObjectHashCode(), LibraryPackage::getPackageTable(), GetRoutineName(), SystemInterpreter::getSourceString(), RexxTarget::getWord(), RexxObject::idString(), RexxSource::initFile(), RexxMutableBuffer::insert(), insert(), isEqual(), isInteger(), isSymbol(), StringUtil::lastPos(), lastPos(), lastPosRexx(), left(), RexxMethod::loadExternalMethod(), RoutineClass::loadExternalRoutine(), PackageManager::loadRequires(), lower(), StringUtil::makearray(), makeArrayRexx(), RexxClass::makeProxy(), makeString(), Interpreter::messageNumber(), RexxMutableBufferClass::newRexx(), newRexx(), numberString(), ObjectToStringValue(), RexxNativeActivation::objectToValue(), RexxMemory::orphanCheckMark(), RexxMutableBuffer::overlay(), overlay(), RexxNativeActivation::pointerString(), StringUtil::pos(), pos(), RexxSource::position(), posRexx(), primitiveCaselessCompareTo(), primitiveCaselessIsEqual(), RexxMutableBuffer::primitiveCaselessMatch(), primitiveCaselessMatch(), primitiveCompareTo(), primitiveIsEqual(), RexxMutableBuffer::primitiveMatch(), primitiveMatch(), RexxNativeActivation::processArguments(), RoutineClass::processInstore(), ProgramMetaData::ProgramMetaData(), put(), SystemInterpreter::qualifyFileSystemName(), PackageManager::queryRegisteredRoutine(), RexxMutableBuffer::replaceAt(), replaceAt(), InterpreterInstance::resolveCommandHandler(), RexxSource::resolveKeyword(), SysInterpreterInstance::resolveProgramName(), PackageManager::resolveRegisteredRoutineEntry(), PackageManager::resolveRoutine(), RoutineClass::restoreFromMacroSpace(), reverse(), right(), rmemcmp(), rmemcpy(), rstrcat(), rstrcmp(), rstrcpy(), SetEnvironmentVariable(), RexxObject::setMethod(), space(), strictComp(), StringData(), RexxHashTable::stringGet(), RexxHashTable::stringGetAll(), RexxHashTable::stringPut(), stringTrace(), stringValue(), strip(), subchar(), substr(), subWord(), subWords(), toRxstring(), RexxArray::toString(), RexxActivation::traceEntry(), RexxActivation::traceSourceString(), RexxActivation::traceValue(), RexxMutableBuffer::translate(), translate(), truthValue(), upper(), SystemInterpreter::valueFunction(), StringUtil::verify(), verify(), word(), wordIndex(), wordLength(), StringUtil::wordPos(), wordPos(), words(), x2b(), and x2c().

◆ getStringHash()

HashCode RexxString::getStringHash ( )
inline

Definition at line 133 of file StringClass.hpp.

References getLength(), hashValue, and stringData.

Referenced by getHashValue().

◆ getValue() [1/2]

RexxObject * RexxString::getValue ( RexxActivation context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 1942 of file StringClass.cpp.

◆ getValue() [2/2]

RexxObject * RexxString::getValue ( RexxVariableDictionary context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 1952 of file StringClass.cpp.

◆ getWritableData()

◆ hash()

HashCode RexxString::hash ( )
virtual

Hash an exported object. Of we're a non-primitive one, this will require us to send the HASHCODE message to request a hash value.

Returns
A "hashed hash" that can be used by the map collections.

Reimplemented from RexxObject.

Definition at line 73 of file StringClass.cpp.

References getHashValue(), isString(), and RexxObject::sendMessage().

◆ hasLower()

bool RexxString::hasLower ( )
inline

Definition at line 341 of file StringClass.hpp.

References Attributes, and STRING_HASLOWER.

Referenced by upper().

◆ insert()

◆ integerDivide()

RexxObject * RexxString::integerDivide ( RexxObject right)

◆ integerValue()

◆ isEqual()

◆ isGreaterOrEqual()

RexxInteger * RexxString::isGreaterOrEqual ( RexxObject other)

Definition at line 1100 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isGreaterThan()

RexxInteger * RexxString::isGreaterThan ( RexxObject other)

Definition at line 1076 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isInteger()

RexxObject * RexxString::isInteger ( )

◆ isLessOrEqual()

RexxInteger * RexxString::isLessOrEqual ( RexxObject other)

Definition at line 1112 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isLessThan()

RexxInteger * RexxString::isLessThan ( RexxObject other)

Definition at line 1088 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isSymbol()

◆ lastPos()

size_t RexxString::lastPos ( RexxString needle,
size_t  _start 
)

Primitive implementation of a lastpos search.

Parameters
needleThe search needle.
startThe starting position (origin 1).
Returns
Returns the last match position, searching back from the start position. The starting position is the right-most character of the past possible match (as if the string was truncated at start).

Definition at line 502 of file StringClassMisc.cpp.

References getLength(), getStringData(), and StringUtil::lastPos().

◆ lastPosRexx()

RexxInteger * RexxString::lastPosRexx ( RexxString needle,
RexxInteger _start,
RexxInteger _range 
)

Do a lastpos() search for a string.

Parameters
needleThe search needle.
_startThe starting position.
Returns
the offset of the match position (origin 1). Returns 0 if no match was found.

Definition at line 465 of file StringClassMisc.cpp.

References getLength(), getStringData(), and StringUtil::lastPosRexx().

Referenced by builtin_function_LASTPOS(), and RexxMemory::createImage().

◆ left()

◆ lengthRexx()

RexxObject * RexxString::lengthRexx ( )

Definition at line 473 of file StringClass.cpp.

References getLength(), and new_integer().

Referenced by builtin_function_LENGTH(), and RexxMemory::createImage().

◆ live()

void RexxString::live ( size_t  liveMark)
virtual

Reimplemented from RexxObject.

Definition at line 136 of file StringClass.cpp.

References memory_mark, and NumberString.

◆ liveGeneral()

void RexxString::liveGeneral ( int  reason)
virtual

Reimplemented from RexxObject.

Definition at line 145 of file StringClass.cpp.

References memory_mark_general, and NumberString.

◆ logicalOperation()

RexxObject* RexxString::logicalOperation ( RexxObject ,
RexxObject ,
unsigned int   
)

◆ logicalValue()

bool RexxString::logicalValue ( logical_t result)
virtual

Convert an object to a logical value without raising an error.

Parameters
resultThe converted value.
Returns
true if this converted ok, false for an invalid logical.

Reimplemented from RexxObject.

Definition at line 1386 of file StringClass.cpp.

References getChar(), getLength(), isOfClass, and RexxObject::requestString().

Referenced by RexxObject::logicalValue().

◆ lower() [1/2]

RexxString * RexxString::lower ( )

Definition at line 1526 of file StringClass.cpp.

References getLength(), getStringData(), getWritableData(), and raw_string().

Referenced by lowerRexx(), RexxTarget::next(), and StringLower().

◆ lower() [2/2]

RexxString * RexxString::lower ( size_t  offset,
size_t  _length 
)

Lowercase a portion of a Rexx string, returning a new string object. This method assumes the offset and length are already valid for this string object.

Parameters
startThe starting offset of the segment to lowercase (origin 0).
lengthThe length to lowercase.
Returns
A new string object with the case conversion applied.

Definition at line 1650 of file StringClass.cpp.

References extract(), getLength(), and getWritableData().

◆ lowerRexx()

RexxString * RexxString::lowerRexx ( RexxInteger _start,
RexxInteger _length 
)

Rexx exported method stub for the lower() method.

Parameters
startThe optional starting location. Defaults to the first character if not specified.
lengthThe length to convert. Defaults to the segment from the start position to the end of the string.
Returns
A new string object with the case conversion applied.

Definition at line 1582 of file StringClass.cpp.

References ARG_ONE, ARG_TWO, getLength(), lower(), Numerics::minVal(), optionalLengthArgument(), and optionalPositionArgument().

Referenced by RexxMemory::createImage().

◆ makeArray()

RexxArray * RexxString::makeArray ( void  )
virtual

Baseclass optimization for handling request array calls.

Returns
The string object converted to an array using default arguments.

Reimplemented from RexxObject.

Definition at line 219 of file StringClass.cpp.

References RexxObject::makeArrayRexx(), and OREF_NULL.

Referenced by RexxInteger::makeArray(), and RexxNumberString::makeArray().

◆ makeArrayRexx()

RexxArray * RexxString::makeArrayRexx ( RexxString div)

Definition at line 1822 of file StringClass.cpp.

References getLength(), getStringData(), and StringUtil::makearray().

◆ makeString()

RexxString * RexxString::makeString ( )
virtual

Reimplemented from RexxObject.

Definition at line 199 of file StringClass.cpp.

References getLength(), getStringData(), RexxInternalObject::isBaseClass(), and new_string().

◆ match()

RexxInteger * RexxString::match ( RexxInteger start_,
RexxString other,
RexxInteger offset_,
RexxInteger len_ 
)

Test if regions within two strings match.

Parameters
start_The starting compare position within the target string. This must be within the bounds of the string.
otherThe other compare string.
offset_The starting offset of the compare string. This must be within the string bounds. The default start postion is 1.
len_The length of the compare substring. The length and the offset must specify a valid substring of other. If not specified, this defaults to the substring from the offset to the end of the string.
Returns
True if the two regions match, false for any mismatch.

Definition at line 854 of file StringClassMisc.cpp.

References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, Error_Incorrect_method_length, Error_Incorrect_method_position, getLength(), optionalLengthArgument(), optionalPositionArgument(), positionArgument(), primitiveMatch(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ matchChar()

RexxInteger * RexxString::matchChar ( RexxInteger position_,
RexxString matchSet 
)

Compare a single character at a give position against a set of characters to see if any of the characters is a match.

Parameters
position_The character position
matchSetThe set to compare against.
Returns
true if the character at the give position is any of the characters, false if none of them match.

Definition at line 989 of file StringClassMisc.cpp.

References ARG_ONE, ARG_TWO, Error_Incorrect_method_position, getChar(), getLength(), positionArgument(), reportException(), stringArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ Max()

RexxObject * RexxString::Max ( RexxObject **  args,
size_t  argCount 
)

◆ memCompare() [1/2]

◆ memCompare() [2/2]

bool RexxString::memCompare ( RexxString other)
inline

Definition at line 349 of file StringClass.hpp.

References length, and stringData.

◆ memCopy()

void RexxString::memCopy ( char *  s)
inline

Definition at line 350 of file StringClass.hpp.

References length, and stringData.

◆ Min()

RexxObject * RexxString::Min ( RexxObject **  args,
size_t  argCount 
)

◆ minus()

RexxObject * RexxString::minus ( RexxObject right)

◆ multiply()

RexxObject * RexxString::multiply ( RexxObject right)

◆ newProxy()

RexxString * RexxString::newProxy ( const char *  string)
static

Definition at line 2123 of file StringClass.cpp.

References RexxInternalObject::makeProxiedObject(), and new_string().

Referenced by new_proxy().

◆ newRexx()

RexxString * RexxString::newRexx ( RexxObject **  init_args,
size_t  argCount 
)

◆ newString() [1/3]

RexxString * RexxString::newString ( const char *  string,
size_t  length 
)
static

◆ newString() [2/3]

RexxString * RexxString::newString ( double  d)
static

◆ newString() [3/3]

RexxString * RexxString::newString ( double  number,
size_t  precision 
)
static

Convert a double value to a string using the provided precision.

Parameters
numberThe number to convert.
precisionThe precision requested for the result.
Returns
A string value of the converted result.

Definition at line 2101 of file StringClass.cpp.

References new_string().

◆ newUpperString()

RexxString * RexxString::newUpperString ( const char *  string,
stringsize_t  length 
)
static

Allocate an initialize a string object that will also contain only uppercase characters. This allows a creation and uppercase operation to be done in one shot, without requiring two string objects to be created.

Parameters
stringThe source string data.
lengthThe length of the string data.
Returns
A newly constructed string object.

Definition at line 2047 of file StringClass.cpp.

References getWritableData(), hashValue, length, new_object(), putChar(), RexxString(), RexxInternalObject::setHasNoReferences(), setUpperOnly(), and T_String.

Referenced by new_upper_string().

◆ nonNumeric()

bool RexxString::nonNumeric ( )
inline

Definition at line 344 of file StringClass.hpp.

References Attributes, and STRING_NONNUMERIC.

Referenced by fastNumberString(), and numberString().

◆ notEqual()

RexxInteger * RexxString::notEqual ( RexxObject other)

Definition at line 1064 of file StringClass.cpp.

References comp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ notOp()

◆ numberString()

◆ numberValue() [1/2]

bool RexxString::numberValue ( wholenumber_t result)
virtual

◆ numberValue() [2/2]

◆ operator new()

void* RexxString::operator new ( size_t  size,
void *  ptr 
)
inline

Definition at line 121 of file StringClass.hpp.

◆ operatorNot()

RexxObject * RexxString::operatorNot ( RexxObject other)

◆ orOp()

◆ overlay()

◆ plus()

RexxObject * RexxString::plus ( RexxObject right)

◆ pos()

size_t RexxString::pos ( RexxString needle,
size_t  _start 
)

Do a primitive level pos() search on a string.

Parameters
needleThe search needle.
_startThe starting position (origin 0)
Returns
The match position (origin 1). Returns 0 for no match.

Definition at line 721 of file StringClassMisc.cpp.

References getLength(), getStringData(), and StringUtil::pos().

Referenced by changeStr(), and RexxActivity::messageSubstitution().

◆ posRexx()

RexxInteger * RexxString::posRexx ( RexxString needle,
RexxInteger pstart,
RexxInteger range 
)

◆ power()

RexxObject * RexxString::power ( RexxObject right)

◆ primitiveCaselessCompareTo()

RexxInteger * RexxString::primitiveCaselessCompareTo ( RexxString other,
stringsize_t  _start,
stringsize_t  len 
)

Perform a compare of regions of two string objects. Returns -1, 0, 1 based on the relative ordering of the two strings.

Parameters
otherThe source string for the compare.
startThe starting offset within the target string.
lenThe length of the substring to compare.
Returns
-1 if the target string is less than, 0 if the two strings are equal, 1 if the target string is the greater.

Definition at line 1171 of file StringClassMisc.cpp.

References StringUtil::caselessCompare(), getLength(), getStringData(), IntegerMinusOne, IntegerOne, IntegerZero, and Numerics::minVal().

Referenced by caselessCompareToRexx().

◆ primitiveCaselessIsEqual()

bool RexxString::primitiveCaselessIsEqual ( RexxObject otherObj)

Primitive string caseless comparison.

Parameters
otherObjThe other string to compare.
Returns
true if the strings compare, false otherwise.

Definition at line 542 of file StringClass.cpp.

References ARG_ONE, StringUtil::caselessCompare(), getLength(), getStringData(), REQUEST_STRING(), requiredArgument(), and TheNilObject.

Referenced by caselessEquals().

◆ primitiveCaselessMatch()

bool RexxString::primitiveCaselessMatch ( stringsize_t  _start,
RexxString other,
stringsize_t  offset,
stringsize_t  len 
)

Perform a caselesee compare of regions of two string objects. Returns true if the two regions match, returns false for mismatches.

Parameters
startThe starting offset within the target string.
otherThe source string for the compare.
offsetThe offset of the substring of the other string to use.
lenThe length of the substring to compare.
Returns
True if the regions match, false otherwise.

Definition at line 963 of file StringClassMisc.cpp.

References StringUtil::caselessCompare(), getLength(), and getStringData().

Referenced by caselessMatch().

◆ primitiveCompareTo()

RexxInteger * RexxString::primitiveCompareTo ( RexxString other,
stringsize_t  _start,
stringsize_t  len 
)

Perform a compare of regions of two string objects. Returns -1, 0, 1 based on the relative ordering of the two strings.

Parameters
otherThe source string for the compare.
startThe starting offset within the target string.
lenThe length of the substring to compare.
Returns
-1 if the target string is less than, 0 if the two strings are equal, 1 if the target string is the greater.

Definition at line 1083 of file StringClassMisc.cpp.

References getLength(), getStringData(), IntegerMinusOne, IntegerOne, IntegerZero, and Numerics::minVal().

Referenced by compareToRexx().

◆ primitiveIsEqual()

bool RexxString::primitiveIsEqual ( RexxObject otherObj)

◆ primitiveMakeString()

RexxString * RexxString::primitiveMakeString ( )
virtual

Reimplemented from RexxObject.

Definition at line 236 of file StringClass.cpp.

◆ primitiveMatch()

bool RexxString::primitiveMatch ( stringsize_t  _start,
RexxString other,
stringsize_t  offset,
stringsize_t  len 
)

Perform a compare of regions of two string objects. Returns true if the two regions match, returns false for mismatches.

Parameters
startThe starting offset within the target string.
otherThe source string for the compare.
offsetThe offset of the substring of the other string to use.
lenThe length of the substring to compare.
Returns
True if the regions match, false otherwise.

Definition at line 936 of file StringClassMisc.cpp.

References getLength(), and getStringData().

Referenced by match().

◆ put() [1/2]

◆ put() [2/2]

void RexxString::put ( size_t  s,
RexxString o 
)
inline

Definition at line 336 of file StringClass.hpp.

References getLength(), getStringData(), and put().

Referenced by put().

◆ putChar()

◆ rawString()

RexxString * RexxString::rawString ( size_t  length)
static

◆ remainder()

RexxObject * RexxString::remainder ( RexxObject right)

◆ replaceAt()

RexxString * RexxString::replaceAt ( RexxString newStrObj,
RexxInteger position,
RexxInteger _length,
RexxString pad 
)

Replace a substring starting at a given position and length with another string. This operation is essentially a delstr() followed by an insert() operation.

Parameters
newStrObjThe replacement string
positionThe replacement position (required)
_lengthThe length of string to replace (optional). If omitted, the length of the replacement string is used and this is essentially an overlay operation.
padThe padding character if padding is required. The default is a ' '
Returns
A new instance of the string with the value replace.

Definition at line 448 of file StringClassSub.cpp.

References ARG_FOUR, ARG_ONE, ARG_THREE, ARG_TWO, getLength(), getStringData(), getWritableData(), optionalLengthArgument(), optionalPadArgument(), positionArgument(), raw_string(), and stringArgument().

Referenced by RexxMemory::createImage().

◆ reverse()

RexxString * RexxString::reverse ( )

Definition at line 520 of file StringClassSub.cpp.

References getLength(), getStringData(), getWritableData(), and raw_string().

Referenced by RexxMemory::createImage().

◆ right()

◆ round()

RexxObject * RexxString::round ( )

The String class version of the round method.

Returns
The formatted numeric version.

Definition at line 977 of file StringClass.cpp.

References Error_Incorrect_method_string_nonumber, fastNumberString(), OREF_NULL, reportException(), and RexxNumberString::round().

Referenced by RexxMemory::createImage().

◆ set()

◆ setHasLower()

void RexxString::setHasLower ( )
inline

Definition at line 343 of file StringClass.hpp.

References Attributes, and STRING_HASLOWER.

Referenced by checkLower().

◆ setLength()

void RexxString::setLength ( size_t  l)
inline

Definition at line 331 of file StringClass.hpp.

References length.

Referenced by newString(), and rawString().

◆ setNonNumeric()

void RexxString::setNonNumeric ( )
inline

Definition at line 345 of file StringClass.hpp.

References Attributes, and STRING_NONNUMERIC.

Referenced by createNumberString(), and numberString().

◆ setNumberString()

void RexxString::setNumberString ( RexxObject NumberRep)

◆ setUpperOnly()

void RexxString::setUpperOnly ( )
inline

Definition at line 342 of file StringClass.hpp.

References Attributes, and STRING_NOLOWER.

Referenced by checkLower(), newUpperString(), RexxSource::sourceNextToken(), and upper().

◆ sign()

◆ sortCaselessCompare() [1/2]

int RexxString::sortCaselessCompare ( RexxString other)
inline

◆ sortCaselessCompare() [2/2]

int RexxString::sortCaselessCompare ( RexxString other,
size_t  startCol,
size_t  colLength 
)
inline

Definition at line 436 of file StringClass.hpp.

References StringUtil::caselessCompare(), length, and stringData.

◆ sortCompare() [1/2]

int RexxString::sortCompare ( RexxString other)
inline

Definition at line 368 of file StringClass.hpp.

References length, and stringData.

Referenced by compare_asc(), compare_asc_cols(), compare_desc(), and compare_desc_cols().

◆ sortCompare() [2/2]

int RexxString::sortCompare ( RexxString other,
size_t  startCol,
size_t  colLength 
)
inline

Definition at line 402 of file StringClass.hpp.

References length, and stringData.

◆ space()

◆ strCaselessCompare()

bool RexxString::strCaselessCompare ( const char *  s)
inline

◆ strCompare()

◆ strictComp()

◆ strictEqual()

RexxInteger * RexxString::strictEqual ( RexxObject other)

◆ strictGreaterOrEqual()

RexxInteger * RexxString::strictGreaterOrEqual ( RexxObject other)

Definition at line 1148 of file StringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictGreaterThan()

RexxInteger * RexxString::strictGreaterThan ( RexxObject other)

Definition at line 1124 of file StringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictLessOrEqual()

RexxInteger * RexxString::strictLessOrEqual ( RexxObject other)

Definition at line 1160 of file StringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictLessThan()

RexxInteger * RexxString::strictLessThan ( RexxObject other)

Definition at line 1136 of file StringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictNotEqual()

RexxInteger * RexxString::strictNotEqual ( RexxObject other)

Definition at line 1044 of file StringClass.cpp.

References primitiveIsEqual(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ stringTrace()

RexxString * RexxString::stringTrace ( )

◆ stringValue()

RexxString * RexxString::stringValue ( )
virtual

Reimplemented from RexxObject.

Definition at line 184 of file StringClass.cpp.

References getLength(), getStringData(), isOfClass, and new_string().

Referenced by Interpreter::messageNumber(), and RexxSource::position().

◆ strip()

RexxString * RexxString::strip ( RexxString optionString,
RexxString stripchar 
)

Strip a set of leading and/or trailing characters from a string, returning a new string value.

Parameters
optionThe option indicating which characters to strip.
stripcharThe set of characters to strip.
Returns
A new string instance, with the target characters removed.

Definition at line 608 of file StringClassSub.cpp.

References ARG_ONE, ARG_TWO, Error_Incorrect_method_option, getLength(), getStringData(), length, StringUtil::matchCharacter(), new_string(), optionalOptionArgument(), optionalStringArgument(), OREF_NULL, reportException(), STRIP_BOTH, STRIP_LEADING, and STRIP_TRAILING.

Referenced by RexxMemory::createImage().

◆ subchar()

RexxString * RexxString::subchar ( RexxInteger positionArg)

Extract a single character from a string object. Returns a null string if the specified position is beyond the bounds of the string.

Parameters
positionArgThe position of the target character. Must be a positive whole number.
Returns
Returns the single character at the target position. Returns a null string if the position is beyond the end of the string.

Definition at line 701 of file StringClassSub.cpp.

References getLength(), getStringData(), and StringUtil::subchar().

Referenced by RexxMemory::createImage().

◆ substr()

RexxString * RexxString::substr ( RexxInteger position,
RexxInteger _length,
RexxString pad 
)

Definition at line 680 of file StringClassSub.cpp.

References getLength(), getStringData(), and StringUtil::substr().

Referenced by RexxMemory::createImage().

◆ subWord()

RexxString * RexxString::subWord ( RexxInteger position,
RexxInteger plength 
)

Definition at line 226 of file StringClassWord.cpp.

References getLength(), getStringData(), and StringUtil::subWord().

Referenced by RexxMemory::createImage().

◆ subWords()

RexxArray * RexxString::subWords ( RexxInteger position,
RexxInteger plength 
)

Returns an array of all words contained in the given range of the string, using the same extraction rules used for subWord() and word().

Parameters
positionThe optional starting position. If not provided, extraction starts with the first word.
plengthThe number of words to extract. If omitted, will extract from the starting postion to the end of the string.
Returns
An array containing the extracted words. If no words are available within the given range, this returns an empty array.

Definition at line 246 of file StringClassWord.cpp.

References getLength(), getStringData(), and StringUtil::subWords().

Referenced by RexxMemory::createImage().

◆ toRxstring() [1/2]

◆ toRxstring() [2/2]

void RexxString::toRxstring ( RXSTRING r)
inline

◆ translate()

◆ trunc()

◆ truthValue()

bool RexxString::truthValue ( int  errorCode)
virtual

◆ unflatten()

RexxObject * RexxString::unflatten ( RexxEnvelope envelope)
virtual

◆ unsignedNumberValue() [1/2]

bool RexxString::unsignedNumberValue ( stringsize_t result)
virtual

◆ unsignedNumberValue() [2/2]

bool RexxString::unsignedNumberValue ( stringsize_t result,
size_t  precision 
)
virtual

◆ upper() [1/2]

RexxString * RexxString::upper ( )

◆ upper() [2/2]

RexxString * RexxString::upper ( size_t  offset,
size_t  _length 
)

Uppercase a portion of a Rexx string, returning a new string object. This method assumes the offset and length are already valid for this string object.

Parameters
startThe starting offset of the segment to uppercase (origin 0).
lengthThe length to lowercase.
Returns
A new string object with the case conversion applied.

Definition at line 1679 of file StringClass.cpp.

References extract(), getLength(), and getWritableData().

◆ upperOnly()

bool RexxString::upperOnly ( )
inline

Definition at line 340 of file StringClass.hpp.

References Attributes, and STRING_NOLOWER.

Referenced by upper().

◆ upperRexx()

RexxString * RexxString::upperRexx ( RexxInteger _start,
RexxInteger _length 
)

Rexx exported method stub for the upper() method.

Parameters
startThe optional starting location. Defaults to the first character if not specified.
lengthThe length to convert. Defaults to the segment from the start position to the end of the string.
Returns
A new string object with the case conversion applied.

Definition at line 1615 of file StringClass.cpp.

References ARG_ONE, ARG_TWO, getLength(), Numerics::minVal(), optionalLengthArgument(), optionalPositionArgument(), and upper().

Referenced by RexxMemory::createImage(), and translate().

◆ verify()

RexxInteger * RexxString::verify ( RexxString ref,
RexxString option,
RexxInteger _start,
RexxInteger range 
)

Definition at line 826 of file StringClassMisc.cpp.

References getLength(), getStringData(), and StringUtil::verify().

Referenced by RexxMemory::createImage().

◆ word()

◆ wordIndex()

RexxInteger * RexxString::wordIndex ( RexxInteger position)

Definition at line 269 of file StringClassWord.cpp.

References getLength(), getStringData(), and StringUtil::wordIndex().

Referenced by RexxMemory::createImage().

◆ wordLength()

RexxInteger * RexxString::wordLength ( RexxInteger position)

Definition at line 280 of file StringClassWord.cpp.

References getLength(), getStringData(), and StringUtil::wordLength().

Referenced by RexxMemory::createImage().

◆ wordPos()

RexxInteger * RexxString::wordPos ( RexxString phrase,
RexxInteger pstart 
)

Perform a wordpos search on a string object.

Parameters
phraseThe search phrase
pstartThe starting search position.
Returns
The index of the match location.

Definition at line 294 of file StringClassWord.cpp.

References getLength(), getStringData(), and StringUtil::wordPos().

Referenced by builtin_function_STREAM(), and RexxMemory::createImage().

◆ words()

RexxInteger * RexxString::words ( )

◆ x2b()

◆ x2c()

RexxString * RexxString::x2c ( )

Definition at line 284 of file StringClassConversion.cpp.

References getLength(), getStringData(), and StringUtil::packHex().

Referenced by RexxMemory::createImage().

◆ x2d()

RexxString * RexxString::x2d ( RexxInteger _length)

Definition at line 301 of file StringClassConversion.cpp.

References x2dC2d().

Referenced by RexxMemory::createImage().

◆ x2dC2d()

◆ xorOp()

Member Data Documentation

◆ Attributes

size_t RexxString::Attributes
protected

◆ classInstance

RexxClass * RexxString::classInstance = OREF_NULL
static

Definition at line 482 of file StringClass.hpp.

◆ hashValue

HashCode RexxString::hashValue
protected

Definition at line 486 of file StringClass.hpp.

Referenced by getStringHash(), newString(), newUpperString(), and rawString().

◆ length

◆ NumberString

RexxNumberString* RexxString::NumberString
protected

◆ operatorMethods

PCPPM RexxString::operatorMethods
static

Definition at line 479 of file StringClass.hpp.

◆ stringData


The documentation for this class was generated from the following files: