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)  

StringClass.hpp
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 1995, 2004 IBM Corporation. All rights reserved. */
4 /* Copyright (c) 2005-2009 Rexx Language Association. All rights reserved. */
5 /* */
6 /* This program and the accompanying materials are made available under */
7 /* the terms of the Common Public License v1.0 which accompanies this */
8 /* distribution. A copy is also available at the following address: */
9 /* http://www.oorexx.org/license.html */
10 /* */
11 /* Redistribution and use in source and binary forms, with or */
12 /* without modification, are permitted provided that the following */
13 /* conditions are met: */
14 /* */
15 /* Redistributions of source code must retain the above copyright */
16 /* notice, this list of conditions and the following disclaimer. */
17 /* Redistributions in binary form must reproduce the above copyright */
18 /* notice, this list of conditions and the following disclaimer in */
19 /* the documentation and/or other materials provided with the distribution. */
20 /* */
21 /* Neither the name of Rexx Language Association nor the names */
22 /* of its contributors may be used to endorse or promote products */
23 /* derived from this software without specific prior written permission. */
24 /* */
25 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
26 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
27 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
28 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
29 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
30 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
31 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
32 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
33 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
34 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
35 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
36 /* */
37 /*----------------------------------------------------------------------------*/
38 /******************************************************************************/
39 /* REXX Kernel StringClass.hpp */
40 /* */
41 /* Primitive String Class Definition */
42 /* */
43 /******************************************************************************/
44 #ifndef Included_RexxString
45 #define Included_RexxString
46 
47 #include "NumberStringClass.hpp"
48 #include "IntegerClass.hpp"
49 #include "StringUtil.hpp"
50 #include "Utilities.hpp"
51  /* return values from the is_symbol */
52  /* validation method */
53 #define STRING_BAD_VARIABLE 0
54 #define STRING_STEM 1
55 #define STRING_COMPOUND_NAME 2
56 #define STRING_LITERAL 3
57 #define STRING_LITERAL_DOT 4
58 #define STRING_NUMERIC 5
59 #define STRING_NAME 6
60 
61 #define STRING_HASLOWER 0x01 /* string does contain lowercase */
62 #define STRING_NOLOWER 0x02 /* string does not contain lowercase */
63 #define STRING_NONNUMERIC 0x04 /* string is non-numeric */
64 
65 #define INITIAL_NAME_SIZE 10 /* first name table allocation */
66 #define EXTENDED_NAME_SIZE 10 /* amount to extend table by */
67  /* Strip function options */
68 #define STRIP_BOTH 'B'
69 #define STRIP_LEADING 'L'
70 #define STRIP_TRAILING 'T'
71  /* Datatype function options */
72 #define DATATYPE_ALPHANUMERIC 'A'
73 #define DATATYPE_BINARY 'B'
74 #define DATATYPE_LOWERCASE 'L'
75 #define DATATYPE_MIXEDCASE 'M'
76 #define DATATYPE_NUMBER 'N'
77 #define DATATYPE_SYMBOL 'S'
78 #define DATATYPE_VARIABLE 'V'
79 #define DATATYPE_UPPERCASE 'U'
80 #define DATATYPE_WHOLE_NUMBER 'W'
81 #define DATATYPE_HEX 'X'
82 #define DATATYPE_9DIGITS '9'
83 #define DATATYPE_LOGICAL 'O' // lOgical.
84  /* Verify function options */
85 #define VERIFY_MATCH 'M'
86 #define VERIFY_NOMATCH 'N'
87 
88 #define ch_SPACE ' '
89 
90  /* character validation sets for the */
91  /* datatype function */
92 #define HEX_CHAR_STR "0123456789ABCDEFabcdef"
93 #define ALPHANUM \
94 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
95 #define BINARI "01"
96 #define LOWER_ALPHA "abcdefghijklmnopqrstuvwxyz"
97 #define MIXED_ALPHA \
98 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
99 #define UPPER_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
100 
101 
102 /*********************************************************************/
103 /* */
104 /* Name: IntToHexdigit */
105 /* */
106 /* Descriptive name: convert int to hexadecimal digit */
107 /* */
108 /* Returns: A hexadecimal digit representing n. */
109 /* */
110 /*********************************************************************/
111 
112  /* convert the number */
113 inline char IntToHexDigit(int n)
114 {
115  return "0123456789ABCDEF"[n];
116 }
117 
118 
119  class RexxString : public RexxObject {
120  public:
121  inline void *operator new(size_t size, void *ptr){return ptr;};
122  inline RexxString() {;} ;
123  inline RexxString(RESTORETYPE restoreType) { ; };
124 
125  void live(size_t);
126  void liveGeneral(int reason);
127  void flatten(RexxEnvelope *envelope);
129 
130  virtual HashCode hash();
131  virtual HashCode getHashValue();
132 
134  {
135  if (hashValue == 0) // if we've never generated this, the code is zero
136  {
137  stringsize_t len = this->getLength();
138 
139  HashCode h = 0;
140  // the hash code is generated from all of the string characters.
141  // we do this in a lazy fashion, since most string objects never need to
142  // calculate a hash code, particularly the long ones.
143  // This hashing algorithm is very similar to that used for Java strings.
144  for (stringsize_t i = 0; i < len; i++)
145  {
146  h = 31 * h + this->stringData[i];
147  }
148  this->hashValue = h;
149  }
150  return hashValue;
151  }
153 
154  bool numberValue(wholenumber_t &result, size_t precision);
155  bool numberValue(wholenumber_t &result);
156  bool unsignedNumberValue(stringsize_t &result, size_t precision);
157  bool unsignedNumberValue(stringsize_t &result);
158  bool doubleValue(double &result);
160  RexxInteger *integerValue(size_t);
162  RexxArray *makeArray();
164  void copyIntoTail(RexxCompoundTail *buffer);
166  bool truthValue(int);
167  virtual bool logicalValue(logical_t &);
168 
169  bool isEqual(RexxObject *);
187 
188  size_t copyData(size_t, char *, size_t);
192  RexxString *concatToCstring(const char *);
193  RexxString *concatWithCstring(const char *);
195  bool checkLower();
196  RexxString *upper();
197  RexxString *upper(size_t, size_t);
199  RexxString *lower();
200  RexxString *lower(size_t, size_t);
203  void setNumberString(RexxObject *);
204  RexxString *concatWith(RexxString *, char);
205 
213  RexxObject *abs();
214  RexxObject *sign();
215  RexxObject *notOp();
220  RexxObject *Max(RexxObject **args, size_t argCount);
221  RexxObject *Min(RexxObject **args, size_t argCount);
222  RexxObject *trunc(RexxInteger *decimals);
223  RexxObject *floor();
224  RexxObject *ceiling();
225  RexxObject *round();
226  RexxObject *format(RexxObject *Integers, RexxObject *Decimals, RexxObject *MathExp, RexxObject *ExpTrigger);
228  RexxObject *logicalOperation(RexxObject *, RexxObject *, unsigned int);
229  RexxString *extract(size_t offset, size_t sublength) { return newString(this->getStringData() + offset, sublength); }
235  /* the following methods are in */
236  /* OKBSUBS */
243  RexxString *reverse();
257  RexxInteger *words();
258  /* the following methods are in */
259  /* OKBMISC */
268 
271  size_t lastPos(RexxString *needle, size_t start);
272  size_t caselessLastPos(RexxString *needle, size_t start);
273  const char * caselessLastPos(const char *needle, size_t needleLen, const char *haystack, size_t haystackLen);
274 
277  size_t pos(RexxString *, size_t);
278  size_t caselessPos(RexxString *, size_t);
279 
284  size_t caselessCountStr(RexxString *);
285  /* the following methods are in */
286  /* OKBBITS */
290  /* the following methods are in */
291  /* OKBCONV */
292  RexxString *b2x();
294  RexxString *c2x();
299  RexxString *x2b();
300  RexxString *x2c();
302  RexxString *x2dC2d(RexxInteger *, bool);
303 
304  RexxInteger *match(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_);
305  RexxInteger *caselessMatch(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_);
308  RexxInteger *matchChar(RexxInteger *position_, RexxString *matchSet);
309  RexxInteger *caselessMatchChar(RexxInteger *position_, RexxString *matchSet);
310 
315 
316  RexxInteger *equals(RexxString *other);
318 
320 
321 /****************************************************************************/
322 /* */
323 /* RexxString Methods in OKBMISC.C */
324 /* */
325 /****************************************************************************/
326  int isSymbol();
327 
328 /* Inline_functions */
329 
330  inline size_t getLength() { return this->length; };
331  inline void setLength(size_t l) { this->length = l; };
332  inline void finish(stringsize_t l) { length = l; }
333  inline const char *getStringData() { return this->stringData; };
334  inline char *getWritableData() { return &this->stringData[0]; };
335  inline void put(size_t s, const void *b, size_t l) { memcpy(getWritableData() + s, b, l); };
336  inline void put(size_t s, RexxString *o) { put(s, o->getStringData(), o->getLength()); };
337  inline void set(size_t s,int c, size_t l) { memset((this->stringData+s), c, l); };
338  inline char getChar(size_t p) { return *(this->stringData+p); };
339  inline char putChar(size_t p,char c) { return *(this->stringData+p) = c; };
340  inline bool upperOnly() {return (this->Attributes&STRING_NOLOWER) != 0;};
341  inline bool hasLower() {return (this->Attributes&STRING_HASLOWER) != 0;};
342  inline void setUpperOnly() { this->Attributes |= STRING_NOLOWER;};
343  inline void setHasLower() { this->Attributes |= STRING_HASLOWER;};
344  inline bool nonNumeric() {return (this->Attributes&STRING_NONNUMERIC) != 0;};
345  inline void setNonNumeric() { this->Attributes |= STRING_NONNUMERIC;};
346  inline bool strCompare(const char * s) {return this->memCompare((s), strlen(s));};
347  inline bool strCaselessCompare(const char * s) { return (size_t)this->length == strlen(s) && Utilities::strCaselessCompare(s, this->stringData) == 0;}
348  inline bool memCompare(const char * s, size_t l) { return l == this->length && memcmp(s, this->stringData, l) == 0; }
349  inline bool memCompare(RexxString *other) { return other->length == this->length && memcmp(other->stringData, this->stringData, length) == 0; }
350  inline void memCopy(char * s) { memcpy(s, stringData, length); }
352  inline void toRxstring(RXSTRING &r) { r.strptr = getWritableData(); r.strlength = getLength(); }
353  void copyToRxstring(RXSTRING &r);
354  inline bool endsWith(char c) { return this->length > 0 && this->stringData[this->length - 1] == c; }
355 
357 
359  if (this->nonNumeric()) /* Did we already try and convert to */
360  /* to a numberstring and fail? */
361  return OREF_NULL; /* Yes, no need to try agian. */
362 
363  if (this->NumberString != OREF_NULL) /* see if we have already converted */
364  return this->NumberString; /* return the numberString Object. */
365  return createNumberString(); /* go build the number string version */
366  }
367 
368  inline int sortCompare(RexxString *other) {
369  size_t compareLength = length;
370  if (compareLength > other->length) {
371  compareLength = other->length;
372  }
373  int result = memcmp(stringData, other->stringData, compareLength);
374  if (result == 0) {
375  if (length > other->length) {
376  result = 1;
377  }
378  else if (length < other->length) {
379  result = -1;
380  }
381  }
382  return result;
383  }
384 
385  inline int sortCaselessCompare(RexxString *other) {
386  size_t compareLength = length;
387  if (compareLength > other->length) {
388  compareLength = other->length;
389  }
390  int result = StringUtil::caselessCompare(stringData, other->stringData, compareLength);
391  if (result == 0) {
392  if (length > other->length) {
393  result = 1;
394  }
395  else if (length < other->length) {
396  result = -1;
397  }
398  }
399  return result;
400  }
401 
402  inline int sortCompare(RexxString *other, size_t startCol, size_t colLength) {
403  int result = 0;
404  if ((startCol < length ) && (startCol < other->length)) {
405  size_t stringLength = length;
406  if (stringLength > other->length) {
407  stringLength = other->length;
408  }
409  stringLength = stringLength - startCol + 1;
410  size_t compareLength = colLength;
411  if (compareLength > stringLength) {
412  compareLength = stringLength;
413  }
414 
415  result = memcmp(stringData + startCol, other->stringData + startCol, compareLength);
416  if (result == 0 && stringLength < colLength) {
417  if (length > other->length) {
418  result = 1;
419  }
420  else if (length < other->length) {
421  result = -1;
422  }
423  }
424  }
425  else {
426  if (length == other->length) {
427  result = 0;
428  }
429  else {
430  result = length < other->length ? -1 : 1;
431  }
432  }
433  return result;
434  }
435 
436  inline int sortCaselessCompare(RexxString *other, size_t startCol, size_t colLength) {
437  int result = 0;
438  if ((startCol < length ) && (startCol < other->length)) {
439  size_t stringLength = length;
440  if (stringLength > other->length) {
441  stringLength = other->length;
442  }
443  stringLength = stringLength - startCol + 1;
444  size_t compareLength = colLength;
445  if (compareLength > stringLength) {
446  compareLength = stringLength;
447  }
448 
449  result = StringUtil::caselessCompare(stringData + startCol, other->stringData + startCol, compareLength);
450  if (result == 0 && stringLength < colLength) {
451  if (length > other->length) {
452  result = 1;
453  }
454  else if (length < other->length) {
455  result = -1;
456  }
457  }
458  }
459  else {
460  if (length == other->length) {
461  result = 0;
462  }
463  else {
464  result = length < other->length ? -1 : 1;
465  }
466  }
467  return result;
468  }
469 
470 
471  static RexxString *newString(const char *, size_t);
472  static RexxString *rawString(size_t);
473  static RexxString *newUpperString(const char *, stringsize_t);
474  static RexxString *newString(double d);
475  static RexxString *newString(double d, size_t precision);
476  static RexxString *newProxy(const char *);
477  // NB: newRexx() cannot be static and exported as an ooRexx method.
478  RexxString *newRexx(RexxObject **, size_t);
480 
481  static void createInstance();
483 
484  protected:
485 
486  HashCode hashValue; // stored has value
487  size_t length; /* string length */
488  RexxNumberString *NumberString; /* lookaside information */
489  size_t Attributes; /* string attributes */
490  char stringData[4]; /* Start of the string data part */
491  };
492 
493 
494 // some handy functions for doing cstring/RexxString manipulations
495 
496  inline void * rmemcpy(void *t, RexxString *s, size_t len)
497  {
498  return memcpy(t, s->getStringData(), len);
499  }
500 
501  inline int rmemcmp(const void *t, RexxString *s, size_t len)
502  {
503  return memcmp(t, s->getStringData(), len);
504  }
505 
506  inline char * rstrcpy(char *t, RexxString *s)
507  {
508  return strcpy(t, s->getStringData());
509  }
510 
511  inline char * rstrcat(char *t, RexxString *s)
512  {
513  return strcat(t, s->getStringData());
514  }
515 
516  inline int rstrcmp(const char *t, RexxString *s)
517  {
518  return strcmp(t, s->getStringData());
519  }
520 
521 
522 // String creation inline functions
523 
524 inline RexxString *new_string(const char *s, stringsize_t l)
525 {
526  return RexxString::newString(s, l);
527 }
528 
530 {
531  return RexxString::rawString(l);
532 }
533 
534 inline RexxString *new_string(double d)
535 {
536  return RexxString::newString(d);
537 }
538 
539 inline RexxString *new_string(double d, size_t p)
540 {
541  return RexxString::newString(d, p);
542 }
543 
544 
545 inline RexxString *new_string(const char *string)
546 {
547  return new_string(string, strlen(string));
548 }
549 
550 
551 inline RexxString *new_string(char cc)
552 {
553  return new_string(&cc, 1);
554 }
555 
557 {
558  return new_string(r.strptr, r.strlength);
559 }
560 
561 
563 {
564  return new_string(r.strptr, r.strlength);
565 }
566 
567 inline RexxString *new_proxy(const char *name)
568 {
569 
570  return RexxString::newProxy(name);
571 }
572 
573 inline RexxString *new_upper_string(const char *s, stringsize_t l)
574 {
575  return RexxString::newUpperString(s, l);
576 }
577 
578 inline RexxString *new_upper_string(const char *string)
579 {
580  return new_upper_string(string, strlen(string));
581 }
582 #endif
RexxString::matchChar
RexxInteger * matchChar(RexxInteger *position_, RexxString *matchSet)
Definition: StringClassMisc.cpp:989
RexxString::power
RexxObject * power(RexxObject *right)
Definition: StringClass.cpp:838
RexxString::caselessPosRexx
RexxInteger * caselessPosRexx(RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:700
RexxString::left
RexxString * left(RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:288
RexxString::abs
RexxObject * abs()
Definition: StringClass.cpp:854
RexxString::caselessMatchChar
RexxInteger * caselessMatchChar(RexxInteger *position_, RexxString *matchSet)
Definition: StringClassMisc.cpp:1025
StringUtil.hpp
RexxString::caselessEquals
RexxInteger * caselessEquals(RexxString *other)
Definition: StringClass.cpp:1029
RexxString::floor
RexxObject * floor()
Definition: StringClass.cpp:941
RexxExpressionStack
Definition: ExpressionStack.hpp:53
logical_t
size_t logical_t
Definition: rexx.h:230
RexxString::ceiling
RexxObject * ceiling()
Definition: StringClass.cpp:959
RexxString::lowerRexx
RexxString * lowerRexx(RexxInteger *, RexxInteger *)
Definition: StringClass.cpp:1582
RexxString::caselessCompareToRexx
RexxInteger * caselessCompareToRexx(RexxString *other, RexxInteger *start_, RexxInteger *len_)
Definition: StringClassMisc.cpp:1147
RexxString::caselessWordPos
RexxInteger * caselessWordPos(RexxString *, RexxInteger *)
Definition: StringClassWord.cpp:308
RexxArray
Definition: ArrayClass.hpp:100
RexxString::trunc
RexxObject * trunc(RexxInteger *decimals)
Definition: StringClass.cpp:920
RexxString::upperRexx
RexxString * upperRexx(RexxInteger *, RexxInteger *)
Definition: StringClass.cpp:1615
RexxString::c2d
RexxString * c2d(RexxInteger *)
Definition: StringClassConversion.cpp:593
RexxString::primitiveCaselessCompareTo
RexxInteger * primitiveCaselessCompareTo(RexxString *other, stringsize_t start, stringsize_t len)
Definition: StringClassMisc.cpp:1171
RexxString::lastPos
size_t lastPos(RexxString *needle, size_t start)
Definition: StringClassMisc.cpp:502
RexxString::isLessThan
RexxInteger * isLessThan(RexxObject *)
Definition: StringClass.cpp:1088
RexxString::space
RexxString * space(RexxInteger *, RexxString *)
Definition: StringClassWord.cpp:145
STRING_NOLOWER
#define STRING_NOLOWER
Definition: StringClass.hpp:62
RexxString::finish
void finish(stringsize_t l)
Definition: StringClass.hpp:332
new_proxy
RexxString * new_proxy(const char *name)
Definition: StringClass.hpp:567
RexxString::isLessOrEqual
RexxInteger * isLessOrEqual(RexxObject *)
Definition: StringClass.cpp:1112
RexxString::words
RexxInteger * words()
Definition: StringClassWord.cpp:319
RexxString::createInstance
static void createInstance()
Definition: StringClass.cpp:67
RexxString::getObjectHashCode
HashCode getObjectHashCode()
Definition: StringClass.cpp:108
StringUtil::caselessCompare
static int caselessCompare(const char *, const char *, size_t)
Definition: StringUtil.cpp:571
RexxString::andOp
RexxObject * andOp(RexxObject *)
Definition: StringClass.cpp:1774
RexxString::format
RexxObject * format(RexxObject *Integers, RexxObject *Decimals, RexxObject *MathExp, RexxObject *ExpTrigger)
Definition: StringClass.cpp:990
RexxString::multiply
RexxObject * multiply(RexxObject *right)
Definition: StringClass.cpp:774
RexxString::put
void put(size_t s, RexxString *o)
Definition: StringClass.hpp:336
_RXSTRING::strlength
size_t strlength
Definition: rexx.h:157
RexxString::primitiveMakeString
RexxString * primitiveMakeString()
Definition: StringClass.cpp:236
RexxString::primitiveIsEqual
bool primitiveIsEqual(RexxObject *)
Definition: StringClass.cpp:511
RexxString::sign
RexxObject * sign()
Definition: StringClass.cpp:870
RexxString::x2d
RexxString * x2d(RexxInteger *)
Definition: StringClassConversion.cpp:301
IntToHexDigit
char IntToHexDigit(int n)
Definition: StringClass.hpp:113
RexxString::compareToRexx
RexxInteger * compareToRexx(RexxString *other, RexxInteger *start_, RexxInteger *len_)
Definition: StringClassMisc.cpp:1061
RexxString::RexxString
RexxString()
Definition: StringClass.hpp:122
RexxString::toRxstring
void toRxstring(RXSTRING &r)
Definition: StringClass.hpp:352
IntegerClass.hpp
RexxString::isSymbol
int isSymbol()
Definition: StringClassMisc.cpp:55
RexxString::sortCompare
int sortCompare(RexxString *other)
Definition: StringClass.hpp:368
_CONSTRXSTRING::strptr
const char * strptr
Definition: rexx.h:163
RexxString::notEqual
RexxInteger * notEqual(RexxObject *)
Definition: StringClass.cpp:1064
RexxString::caselessCompare
RexxInteger * caselessCompare(RexxString *, RexxString *)
Definition: StringClassMisc.cpp:335
STRING_NONNUMERIC
#define STRING_NONNUMERIC
Definition: StringClass.hpp:63
RexxString::insert
RexxString * insert(RexxString *, RexxInteger *, RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:185
RexxString::newString
static RexxString * newString(const char *, size_t)
Definition: StringClass.cpp:1982
RexxString::pos
size_t pos(RexxString *, size_t)
Definition: StringClassMisc.cpp:721
RexxString::unflatten
RexxObject * unflatten(RexxEnvelope *)
Definition: StringClass.cpp:167
RexxString::newProxy
static RexxString * newProxy(const char *)
Definition: StringClass.cpp:2123
RexxString::isGreaterOrEqual
RexxInteger * isGreaterOrEqual(RexxObject *)
Definition: StringClass.cpp:1100
RexxString::hasLower
bool hasLower()
Definition: StringClass.hpp:341
RexxString::truthValue
bool truthValue(int)
Definition: StringClass.cpp:1344
RexxString::getLength
size_t getLength()
Definition: StringClass.hpp:330
RexxString::memCopy
void memCopy(char *s)
Definition: StringClass.hpp:350
_RXSTRING::strptr
char * strptr
Definition: rexx.h:158
RexxString::plus
RexxObject * plus(RexxObject *right)
Definition: StringClass.cpp:742
RexxString::copyIntoTail
void copyIntoTail(RexxCompoundTail *buffer)
Definition: StringClass.cpp:226
RexxString::notOp
RexxObject * notOp()
Definition: StringClass.cpp:1831
RexxString::stringData
char stringData[4]
Definition: StringClass.hpp:490
RexxString::newUpperString
static RexxString * newUpperString(const char *, stringsize_t)
Definition: StringClass.cpp:2047
RexxString::delstr
RexxString * delstr(RexxInteger *, RexxInteger *)
Definition: StringClassSub.cpp:125
RexxString::setHasLower
void setHasLower()
Definition: StringClass.hpp:343
rmemcpy
void * rmemcpy(void *t, RexxString *s, size_t len)
Definition: StringClass.hpp:496
RexxString::countStrRexx
RexxInteger * countStrRexx(RexxString *)
Definition: StringClassMisc.cpp:524
RexxVariableDictionary
Definition: RexxVariableDictionary.hpp:55
RexxString::getValue
RexxObject * getValue(RexxActivation *)
Definition: StringClass.cpp:1942
RexxString::getWritableData
char * getWritableData()
Definition: StringClass.hpp:334
RexxString::copies
RexxString * copies(RexxInteger *)
Definition: StringClassMisc.cpp:389
RexxString::strictLessOrEqual
RexxInteger * strictLessOrEqual(RexxObject *)
Definition: StringClass.cpp:1160
RexxString::caselessAbbrev
RexxInteger * caselessAbbrev(RexxString *, RexxInteger *)
Definition: StringClassMisc.cpp:225
rmemcmp
int rmemcmp(const void *t, RexxString *s, size_t len)
Definition: StringClass.hpp:501
RexxString::b2x
RexxString * b2x()
Definition: StringClassConversion.cpp:542
RexxString::Attributes
size_t Attributes
Definition: StringClass.hpp:489
RexxString::unsignedNumberValue
bool unsignedNumberValue(stringsize_t &result, size_t precision)
Definition: StringClass.cpp:287
RexxString::strictGreaterThan
RexxInteger * strictGreaterThan(RexxObject *)
Definition: StringClass.cpp:1124
RexxString::isEqual
bool isEqual(RexxObject *)
Definition: StringClass.cpp:482
RexxString::strCaselessCompare
bool strCaselessCompare(const char *s)
Definition: StringClass.hpp:347
RexxString::x2b
RexxString * x2b()
Definition: StringClassConversion.cpp:602
RexxString::isInteger
RexxObject * isInteger()
Definition: StringClass.cpp:1847
RexxString::getStringData
const char * getStringData()
Definition: StringClass.hpp:333
RexxString::getChar
char getChar(size_t p)
Definition: StringClass.hpp:338
RexxString::newRexx
RexxString * newRexx(RexxObject **, size_t)
Definition: StringClass.cpp:2141
RexxString::makeArray
RexxArray * makeArray()
Definition: StringClass.cpp:219
RexxEnvelope
Definition: RexxEnvelope.hpp:53
RexxString::bitXor
RexxString * bitXor(RexxString *, RexxString *)
Definition: StringClassBit.cpp:196
RexxString::equal
RexxInteger * equal(RexxObject *)
Definition: StringClass.cpp:1052
RexxString::stringValue
RexxString * stringValue()
Definition: StringClass.cpp:184
RexxString::caselessCountStr
size_t caselessCountStr(RexxString *)
RexxString::d2c
RexxString * d2c(RexxInteger *)
Definition: StringClassConversion.cpp:252
RexxString::x2dC2d
RexxString * x2dC2d(RexxInteger *, bool)
Definition: StringClassConversion.cpp:311
RexxString::abbrev
RexxInteger * abbrev(RexxString *, RexxInteger *)
Definition: StringClassMisc.cpp:185
RexxObject::makeArrayRexx
RexxObject * makeArrayRexx()
Definition: ObjectClass.cpp:2477
RexxString::caselessMatch
RexxInteger * caselessMatch(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
Definition: StringClassMisc.cpp:897
RexxString::checkLower
bool checkLower()
Definition: StringClass.cpp:1417
RexxString::caselessCountStrRexx
RexxInteger * caselessCountStrRexx(RexxString *)
Definition: StringClassMisc.cpp:536
RexxString::remainder
RexxObject * remainder(RexxObject *right)
Definition: StringClass.cpp:822
RexxString::strictEqual
RexxInteger * strictEqual(RexxObject *)
Definition: StringClass.cpp:1035
RexxString::decodeBase64
RexxString * decodeBase64()
Definition: StringClassConversion.cpp:126
raw_string
RexxString * raw_string(stringsize_t l)
Definition: StringClass.hpp:529
RexxString::changeStr
RexxString * changeStr(RexxString *, RexxString *, RexxInteger *)
Definition: StringClassMisc.cpp:547
RexxString::logicalOperation
RexxObject * logicalOperation(RexxObject *, RexxObject *, unsigned int)
rstrcpy
char * rstrcpy(char *t, RexxString *s)
Definition: StringClass.hpp:506
RexxString::nonNumeric
bool nonNumeric()
Definition: StringClass.hpp:344
RexxString::reverse
RexxString * reverse()
Definition: StringClassSub.cpp:520
RexxString::numberString
RexxNumberString * numberString()
Definition: StringClass.cpp:366
new_string
RexxString * new_string(const char *s, stringsize_t l)
Definition: StringClass.hpp:524
RexxString::dataType
RexxObject * dataType(RexxString *)
Definition: StringClassMisc.cpp:436
RexxString::setUpperOnly
void setUpperOnly()
Definition: StringClass.hpp:342
RexxString::live
void live(size_t)
Definition: StringClass.cpp:136
RexxString::liveGeneral
void liveGeneral(int reason)
Definition: StringClass.cpp:145
RexxString::d2x
RexxString * d2x(RexxInteger *)
Definition: StringClassConversion.cpp:268
HashCode
size_t HashCode
Definition: ObjectClass.hpp:77
RexxString::getStringHash
HashCode getStringHash()
Definition: StringClass.hpp:133
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
RexxString::xorOp
RexxObject * xorOp(RexxObject *)
Definition: StringClass.cpp:1802
_RXSTRING
Definition: rexx.h:156
RexxString::strip
RexxString * strip(RexxString *, RexxString *)
Definition: StringClassSub.cpp:608
RexxString::copyToRxstring
void copyToRxstring(RXSTRING &r)
Definition: StringClass.cpp:1928
RexxString::operatorNot
RexxObject * operatorNot(RexxObject *)
Definition: StringClass.cpp:1839
RexxString::equals
RexxInteger * equals(RexxString *other)
Definition: StringClass.cpp:1016
RexxString::set
void set(size_t s, int c, size_t l)
Definition: StringClass.hpp:337
RexxClass
Definition: ClassClass.hpp:49
RexxString::wordLength
RexxInteger * wordLength(RexxInteger *)
Definition: StringClassWord.cpp:280
RexxString::wordPos
RexxInteger * wordPos(RexxString *, RexxInteger *)
Definition: StringClassWord.cpp:294
RexxString::encodeBase64
RexxString * encodeBase64()
Definition: StringClassConversion.cpp:63
RexxString::c2x
RexxString * c2x()
Definition: StringClassConversion.cpp:210
RexxString::concatToCstring
RexxString * concatToCstring(const char *)
Definition: StringClass.cpp:1251
NumberStringClass.hpp
RexxString::getRealValue
RexxObject * getRealValue(RexxActivation *)
Definition: StringClass.cpp:1962
RexxString::classInstance
static RexxClass * classInstance
Definition: StringClass.hpp:482
_CONSTRXSTRING::strlength
size_t strlength
Definition: rexx.h:162
RexxString::compareTo
wholenumber_t compareTo(RexxObject *)
Definition: StringClass.cpp:570
RexxString::endsWith
bool endsWith(char c)
Definition: StringClass.hpp:354
RexxString::strictLessThan
RexxInteger * strictLessThan(RexxObject *)
Definition: StringClass.cpp:1136
RexxString::evaluate
RexxObject * evaluate(RexxActivation *, RexxExpressionStack *)
Definition: StringClass.cpp:1906
RexxString::subWords
RexxArray * subWords(RexxInteger *, RexxInteger *)
Definition: StringClassWord.cpp:246
RexxString::lastPosRexx
RexxInteger * lastPosRexx(RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:465
RexxString::minus
RexxObject * minus(RexxObject *right)
Definition: StringClass.cpp:758
PCPPM
RexxObject *(RexxObject::* PCPPM)()
Definition: ObjectClass.hpp:198
RexxString::word
RexxString * word(RexxInteger *)
Definition: StringClassWord.cpp:258
RexxString::concatWith
RexxString * concatWith(RexxString *, char)
Definition: StringClass.cpp:1743
RexxString::primitiveCompareTo
RexxInteger * primitiveCompareTo(RexxString *other, stringsize_t start, stringsize_t len)
Definition: StringClassMisc.cpp:1083
RexxString::memCompare
bool memCompare(const char *s, size_t l)
Definition: StringClass.hpp:348
RexxString::lengthRexx
RexxObject * lengthRexx()
Definition: StringClass.cpp:473
RexxString::RexxString
RexxString(RESTORETYPE restoreType)
Definition: StringClass.hpp:123
RexxString::caselessLastPosRexx
RexxInteger * caselessLastPosRexx(RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:479
RexxString::Min
RexxObject * Min(RexxObject **args, size_t argCount)
Definition: StringClass.cpp:903
RexxString::upperOnly
bool upperOnly()
Definition: StringClass.hpp:340
RexxString::extract
RexxString * extract(size_t offset, size_t sublength)
Definition: StringClass.hpp:229
RexxString::hash
virtual HashCode hash()
Definition: StringClass.cpp:73
RexxString::setLength
void setLength(size_t l)
Definition: StringClass.hpp:331
RexxString::bitAnd
RexxString * bitAnd(RexxString *, RexxString *)
Definition: StringClassBit.cpp:58
RexxString::hashValue
HashCode hashValue
Definition: StringClass.hpp:486
RexxString::memCompare
bool memCompare(RexxString *other)
Definition: StringClass.hpp:349
RexxString::primitiveCaselessMatch
bool primitiveCaselessMatch(stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
Definition: StringClassMisc.cpp:963
RexxString::createNumberString
RexxNumberString * createNumberString()
Definition: StringClass.cpp:412
RexxString::center
RexxString * center(RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:61
RexxString::posRexx
RexxInteger * posRexx(RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:682
RexxString::caselessLastPos
size_t caselessLastPos(RexxString *needle, size_t start)
Definition: StringClassMisc.cpp:519
RexxString::Max
RexxObject * Max(RexxObject **args, size_t argCount)
Definition: StringClass.cpp:886
RexxString::delWord
RexxString * delWord(RexxInteger *, RexxInteger *)
Definition: StringClassWord.cpp:61
RexxActivation
Definition: RexxActivation.hpp:156
RexxString::rawString
static RexxString * rawString(size_t)
Definition: StringClass.cpp:2010
RexxString::toRxstring
void toRxstring(CONSTRXSTRING &r)
Definition: StringClass.hpp:351
RexxString::strCompare
bool strCompare(const char *s)
Definition: StringClass.hpp:346
RexxNumberString
Definition: NumberStringClass.hpp:93
RexxString::putChar
char putChar(size_t p, char c)
Definition: StringClass.hpp:339
RexxString::operatorMethods
static PCPPM operatorMethods[]
Definition: StringClass.hpp:479
RexxString::concatWithCstring
RexxString * concatWithCstring(const char *)
Definition: StringClass.cpp:1271
wholenumber_t
ssize_t wholenumber_t
Definition: rexx.h:229
RexxString::right
RexxString * right(RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:556
STRING_HASLOWER
#define STRING_HASLOWER
Definition: StringClass.hpp:61
RexxString::lower
RexxString * lower()
Definition: StringClass.cpp:1526
RexxString::flatten
void flatten(RexxEnvelope *envelope)
Definition: StringClass.cpp:154
stringsize_t
size_t stringsize_t
Definition: rexx.h:228
RexxString::orOp
RexxObject * orOp(RexxObject *)
Definition: StringClass.cpp:1788
rstrcmp
int rstrcmp(const char *t, RexxString *s)
Definition: StringClass.hpp:516
RexxString::numberValue
bool numberValue(wholenumber_t &result, size_t precision)
Definition: StringClass.cpp:244
RexxString::subWord
RexxString * subWord(RexxInteger *, RexxInteger *)
Definition: StringClassWord.cpp:226
RexxString::wordIndex
RexxInteger * wordIndex(RexxInteger *)
Definition: StringClassWord.cpp:269
RexxString::length
size_t length
Definition: StringClass.hpp:487
RexxString::setNumberString
void setNumberString(RexxObject *)
Definition: StringClass.cpp:1724
RexxString::makeString
RexxString * makeString()
Definition: StringClass.cpp:199
RexxString::concatBlank
RexxString * concatBlank(RexxObject *)
Definition: StringClass.cpp:1291
RexxString::divide
RexxObject * divide(RexxObject *right)
Definition: StringClass.cpp:790
RexxString::getHashValue
virtual HashCode getHashValue()
Definition: StringClass.cpp:95
RexxString::sortCompare
int sortCompare(RexxString *other, size_t startCol, size_t colLength)
Definition: StringClass.hpp:402
RexxObject::start
RexxMessage * start(RexxObject **, size_t)
Definition: ObjectClass.cpp:1761
RexxString::strictNotEqual
RexxInteger * strictNotEqual(RexxObject *)
Definition: StringClass.cpp:1044
RexxString::caselessChangeStr
RexxString * caselessChangeStr(RexxString *, RexxString *, RexxInteger *)
Definition: StringClassMisc.cpp:614
RexxString::strictGreaterOrEqual
RexxInteger * strictGreaterOrEqual(RexxObject *)
Definition: StringClass.cpp:1148
RexxString::doubleValue
bool doubleValue(double &result)
Definition: StringClass.cpp:330
RexxString::put
void put(size_t s, const void *b, size_t l)
Definition: StringClass.hpp:335
RexxString::integerValue
RexxInteger * integerValue(size_t)
Definition: StringClass.cpp:1694
RexxString::sortCaselessCompare
int sortCaselessCompare(RexxString *other)
Definition: StringClass.hpp:385
RexxString::copyData
size_t copyData(size_t, char *, size_t)
Definition: StringClass.cpp:450
RexxString::strictComp
wholenumber_t strictComp(RexxObject *)
Definition: StringClass.cpp:700
RexxString::bitOr
RexxString * bitOr(RexxString *, RexxString *)
Definition: StringClassBit.cpp:127
RexxString::primitiveCaselessIsEqual
bool primitiveCaselessIsEqual(RexxObject *)
Definition: StringClass.cpp:542
RexxString::translate
RexxString * translate(RexxString *, RexxString *, RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:741
RexxString::comp
wholenumber_t comp(RexxObject *)
Definition: StringClass.cpp:583
RESTORETYPE
RESTORETYPE
Definition: ObjectClass.hpp:80
RexxString::fastNumberString
RexxNumberString * fastNumberString()
Definition: StringClass.hpp:358
RexxString::compare
RexxInteger * compare(RexxString *, RexxString *)
Definition: StringClassMisc.cpp:253
RexxString::match
RexxInteger * match(RexxInteger *start_, RexxString *other, RexxInteger *offset_, RexxInteger *len_)
Definition: StringClassMisc.cpp:854
RexxCompoundTail
Definition: RexxCompoundTail.hpp:52
RexxString::concatRexx
RexxString * concatRexx(RexxObject *)
Definition: StringClass.cpp:1207
RexxString::x2c
RexxString * x2c()
Definition: StringClassConversion.cpp:284
new_upper_string
RexxString * new_upper_string(const char *s, stringsize_t l)
Definition: StringClass.hpp:573
RexxString::integerDivide
RexxObject * integerDivide(RexxObject *right)
Definition: StringClass.cpp:806
Utilities.hpp
RexxInteger
Definition: IntegerClass.hpp:56
RexxString::upper
RexxString * upper()
Definition: StringClass.cpp:1442
RexxString::overlay
RexxString * overlay(RexxString *, RexxInteger *, RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:333
RexxString::logicalValue
virtual bool logicalValue(logical_t &)
Definition: StringClass.cpp:1386
RexxString::isGreaterThan
RexxInteger * isGreaterThan(RexxObject *)
Definition: StringClass.cpp:1076
RexxString::sortCaselessCompare
int sortCaselessCompare(RexxString *other, size_t startCol, size_t colLength)
Definition: StringClass.hpp:436
Utilities::strCaselessCompare
static int strCaselessCompare(const char *opt1, const char *opt2)
Definition: Utilities.cpp:82
RexxString::caselessPos
size_t caselessPos(RexxString *, size_t)
Definition: StringClassMisc.cpp:735
RexxString::concat
RexxString * concat(RexxString *)
Definition: StringClass.cpp:1172
RexxString::substr
RexxString * substr(RexxInteger *, RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:680
RexxString::setNonNumeric
void setNonNumeric()
Definition: StringClass.hpp:345
RexxString::primitiveMatch
bool primitiveMatch(stringsize_t start, RexxString *other, stringsize_t offset, stringsize_t len)
Definition: StringClassMisc.cpp:936
RexxString::round
RexxObject * round()
Definition: StringClass.cpp:977
_CONSTRXSTRING
Definition: rexx.h:161
rstrcat
char * rstrcat(char *t, RexxString *s)
Definition: StringClass.hpp:511
RexxObject
Definition: ObjectClass.hpp:311
RexxString
Definition: StringClass.hpp:119
RexxString::subchar
RexxString * subchar(RexxInteger *)
Definition: StringClassSub.cpp:701
RexxString::NumberString
RexxNumberString * NumberString
Definition: StringClass.hpp:488
RexxString::replaceAt
RexxString * replaceAt(RexxString *, RexxInteger *, RexxInteger *, RexxString *)
Definition: StringClassSub.cpp:448
RexxString::stringTrace
RexxString * stringTrace()
Definition: StringClass.cpp:1474
RexxString::verify
RexxInteger * verify(RexxString *, RexxString *, RexxInteger *, RexxInteger *)
Definition: StringClassMisc.cpp:826