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)  

StringClassConversion.cpp
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 StringClassConversion.cpp */
40 /* */
41 /* REXX string conversion methods */
42 /* */
43 /******************************************************************************/
44 #include <ctype.h>
45 #include <stdlib.h>
46 #include <string.h>
47 #include <math.h>
48 #include "RexxCore.h"
49 #include "StringClass.hpp"
50 #include "BufferClass.hpp"
51 
52 #include "NumberStringMath.hpp"
53 #include "ActivityManager.hpp"
54 #include "StringUtil.hpp"
55 
56 
64 {
65  size_t inc[3];
66  int i;
67  static const char cb64[] =
68  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
69 
70 
71  size_t inputLength = this->getLength(); /* get length of string */
72  if (inputLength == 0) /* null string? */
73  {
74  return OREF_NULLSTRING;
75  }
76  /* figure out the output string length */
77  size_t outputLength = (inputLength / 3) * 4;
78  if (inputLength % 3 > 0)
79  {
80  outputLength += 4;
81  }
82  /* allocate output string */
83  RexxString *retval = raw_string(outputLength);
84  const char *source = this->getStringData(); /* point to converted string */
85  /* point to output area */
86  char *destination = retval->getWritableData();
87  while (inputLength > 0)
88  { /* while more string */
89  int buflen = 0;
90  for (i = 0; i < 3; i++)
91  { /* get the next 3 characters */
92  if (inputLength)
93  { /* from the input string */
94  inc[i] = *source & 0xff;
95  inputLength--;
96  source++;
97  buflen++;
98  }
99  else
100  {
101  inc[i] = '\0';
102  }
103  }
104  if (buflen) {
105  /* now perform the base64 conversion to the next 4 output string chars */
106  *destination = cb64[ inc[0] >> 2 ];
107  destination++;
108  *destination = cb64[ ((inc[0] & 0x03) << 4) | ((inc[1] & 0xf0) >> 4) ];
109  destination++;
110  *destination = (char) (buflen > 1 ? cb64[ ((inc[1] & 0x0f) << 2) | ((inc[2] & 0xc0) >> 6) ] : '=');
111  destination++;
112  *destination = (char) (buflen > 2 ? cb64[ inc[2] & 0x3f ] : '=');
113  destination++;
114  }
115  } /* done building the string */
116  return retval; /* return converted string */
117 }
118 
119 
127 {
128  unsigned int i, j;
129  static const char cb64[] =
130  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
131 
132 
133  size_t inputLength = this->getLength(); /* get length of string */
134  if (inputLength == 0) /* null string? */
135  {
136  return OREF_NULLSTRING; // this encodes as a null string
137  }
138  if (inputLength % 4 > 0) {
139  /* the input string is an invalid length */
141  }
142  const char *source = this->getStringData();
143  /* figure out the output string length */
144  size_t outputLength = (inputLength / 4) * 3;
145  if (*(source + inputLength - 1) == '=')
146  {
147  outputLength--;
148  }
149  if (*(source + inputLength - 2) == '=')
150  {
151  outputLength--;
152  }
153  /* allocate output string */
154  RexxString *retval = raw_string(outputLength);
155  /* point to output area */
156  char *destination = retval->getWritableData();
157  while (inputLength)
158  { /* while more string */
159  for (i = 0; i < 4; i++)
160  {
161  for (j = 0; j < 64; j++)
162  {
163  if (*(cb64 + j) == *(source + i))
164  {
165  break;
166  }
167  }
168  // if we don't find the digit, this might be an invalid string.
169  if (j == 64)
170  {
171  if (*(source + i) == '=' && inputLength <= 4) {
172  /* this means we are done building the output string */
173  break;
174  }
175  else {
176  /* we found an invalid char in the middle of the input string */
178  }
179  }
180  /* j is now the 6-bit value we need for building our output string */
181  switch (i)
182  {
183  case 0:
184  *destination = (char)(j << 2);
185  break;
186  case 1:
187  *destination |= (char)(j >> 4);
188  destination++;
189  *destination = (char)(j << 4);
190  break;
191  case 2:
192  *destination |= (char)(j >> 2);
193  destination++;
194  *destination = (char)(j << 6);
195  break;
196  case 3:
197  *destination |= (char)j;
198  destination++;
199  break;
200  default: /* not really necessary but here anyway */
201  break;
202  }
203  }
204  source += 4;
205  inputLength -= 4;
206  } /* done building the string */
207  return retval; /* return converted string */
208 }
209 
211 /******************************************************************************/
212 /* Function: Process the string C2X method/function */
213 /******************************************************************************/
214 {
215  size_t InputLength; /* length of converted string */
216  RexxString *Retval; /* return value */
217  const char *Source; /* input string pointer */
218  char * Destination; /* output string pointer */
219  char ch; /* current character */
220 
221  InputLength = this->getLength(); /* get length of string */
222  if (!InputLength) /* null string? */
223  {
224  Retval = OREF_NULLSTRING; /* converts to a null string */
225  }
226  else
227  { /* real data to convert */
228  /* allocate output string */
229  Retval = raw_string(InputLength * 2);
230  Source = this->getStringData(); /* point to converted string */
231  /* point to output area */
232  Destination = Retval->getWritableData();
233  while (InputLength--)
234  { /* while more string */
235  ch = *Source++; /* get next character */
236  /***********************************************************/
237  /* get upper nibble after shifting out lower nibble and do */
238  /* logical ANDING with F to convert to integer then convert*/
239  /* to hex value and put it in destination */
240  /***********************************************************/
241  *Destination++ = IntToHexDigit((ch>>4) & 0xF);
242  /***********************************************************/
243  /* logical AND with F to convert lower nibble to integer */
244  /* then convert to hex value and put it in destination */
245  /***********************************************************/
246  *Destination++ = IntToHexDigit(ch & 0xF);
247  }
248  }
249  return Retval; /* return converted string */
250 }
251 
253 /******************************************************************************/
254 /* Function: Process the string D2C method/function */
255 /******************************************************************************/
256 {
257  /* convert to a numberstring */
258  RexxNumberString *numberstring = this->numberString();
259  if (numberstring == OREF_NULL) /* not a valid number? */
260  {
261  /* report this */
263  }
264  /* format as a string value */
265  return numberstring->d2xD2c(_length, true);
266 }
267 
269 /******************************************************************************/
270 /* Function: Process the string D2X method/function */
271 /******************************************************************************/
272 {
273  /* convert to a numberstring */
274  RexxNumberString *numberstring = this->numberString();
275  if (numberstring == OREF_NULL) /* not a valid number? */
276  {
277  /* report this */
279  }
280  /* format as a string value */
281  return numberstring->d2xD2c(_length, false);
282 }
283 
285 /******************************************************************************/
286 /* Function: Process the string X2C method/function */
287 /******************************************************************************/
288 {
289  size_t InputLength = this->getLength(); /* get length of string */
290  if (InputLength== 0) /* null string? */
291  {
292  return OREF_NULLSTRING; /* converts to a null string */
293  }
294  else /* real data to convert */
295  {
296  /* try to pack the data */
297  return StringUtil::packHex(this->getStringData(), InputLength);
298  }
299 }
300 
302 /******************************************************************************/
303 /* Function: Process the string X2D method/function */
304 /******************************************************************************/
305 {
306  /* forward to the common routine */
307  return this->x2dC2d(_length, false);
308 }
309 
310 
312  bool type )
313 /******************************************************************************/
314 /* Function: Common X2D/X2C processing routine */
315 /******************************************************************************/
316 {
317  size_t ResultSize; /* size of result string */
318  size_t TempSize; /* temporary size value */
319  int ch; /* addition character */
320  size_t StringLength; /* input string length */
321  char *Scan; /* scan pointer */
322  char *HighDigit; /* high digit position */
323  char * Accumulator; /* accumulator pointer */
324  bool Negative; /* have a negative number */
325  RexxString *String; /* converted string */
326  char *StringPtr; /* string value pointer */
327  size_t BytePosition; /* position of high byte */
328  size_t NibblePosition; /* position of high nibble */
329  size_t DecLength; /* length of accumulator */
330  size_t TempLength; /* length of accumulator */
331  RexxString *Retval; /* function return value */
332  RexxBuffer *Buffer; /* first math buffer */
333  size_t CurrentDigits; /* current digits setting */
334 
335  CurrentDigits = number_digits(); /* get the current digits setting */
336  StringLength = this->getLength(); /* get Argument string length */
337  /* get the target length */
338  ResultSize = optionalLengthArgument(_length, -1, ARG_ONE);
339  if (!ResultSize) /* zero requested */
340  {
341  return(RexxString *)IntegerZero; /* always returns zero */
342  }
343 
344  String = this; /* use this string directly */
345  StringPtr = this->getWritableData(); /* get a string pointer */
346  NibblePosition = 0; /* assume an even nibble number */
347 
348  if (type == true)
349  { /* dealing with character? */
350  if (_length == OREF_NULL)
351  { /* no size specified? */
352  Negative = false; /* can't be negative */
353  ResultSize = StringLength; /* use entire string */
354  }
355  else
356  { /* have to check for negative */
357  if (ResultSize > StringLength) /* longer than string? */
358  {
359  Negative = false; /* can't be negative */
360  }
361  else
362  { /* have to check sign bit */
363  /* step to byte position */
364  StringPtr += StringLength - ResultSize;
365  StringLength = ResultSize; /* adjust the size down */
366 
367  if (*StringPtr & 0x80)
368  { /* first bit on? */
369  Negative = true; /* this is a negative number */
370  /* copy the string */
371  String = (RexxString *)this->copy();
372  /* point to the string */
373  StringPtr = String->getWritableData() + this->getLength() - ResultSize;
374  }
375  else /* still a positive number */
376  {
377  Negative = false; /* remember for later */
378  }
379  }
380  }
381  }
382  else
383  { /* x2d function */
384  /* pack the string */
385  String = (RexxString *)StringUtil::packHex(StringPtr, StringLength);
386  /* get the packed length */
387  StringLength = String->getLength();
388  /* point to the packed data */
389  StringPtr = String->getWritableData();
390  if (_length == OREF_NULL)
391  { /* no size specified? */
392  Negative = false; /* can't be negative */
393  ResultSize = StringLength; /* use entire string */
394  }
395  else
396  { /* have to check for negative */
397 
398  BytePosition = ResultSize / 2; /* Get position of sign bit */
399  /* get nibble position */
400  NibblePosition = ResultSize % 2;
401  /* Get result size */
402  ResultSize = (BytePosition + NibblePosition);
403  if (ResultSize > StringLength)
404  { /* longer than string? */
405  Negative = false; /* can't be negative */
406  NibblePosition = 0; /* leave the high nibble alone */
407  }
408  else
409  { /* have to check sign bit */
410  /* step to byte position */
411  StringPtr += StringLength - ResultSize;
412  StringLength = ResultSize; /* adjust the size down */
413 
414  if ((NibblePosition && /* odd number of nibbles */
415  /* and low nibble negative? */
416  *StringPtr & 0x08) ||
417  (!NibblePosition && /* or even number of nibbles */
418  *StringPtr & 0x80)) /* and high nibble negative? */
419  {
420  Negative = true; /* this is a negative number */
421  }
422  else /* still a positive number */
423  {
424  Negative = false; /* remember for later */
425  }
426  }
427  }
428  }
429 
430  if (Negative)
431  { /* need to negate string? */
432  Scan = StringPtr; /* copy the pointer */
433  TempSize = StringLength; /* copy the size */
434 
435  while (TempSize--)
436  { /* reverse each byte */
437  /* exclusive or with foxes */
438  *Scan = *Scan ^ 0xff;
439  Scan++; /* step the pointer */
440  }
441  /* point to the first byte */
442  Scan = StringPtr + StringLength - 1;
443  TempSize = StringLength; /* copy the size */
444  while (TempSize--)
445  { /* now add one to the number */
446  ch = (*Scan & 0xff); /* get the character */
447  ch++; /* increment */
448  if (ch <= 0xff)
449  { /* no carry over? */
450  *Scan = ch; /* set value back */
451  break; /* we're finished */
452  }
453  else
454  { /* carried out */
455  *Scan = 0; /* this is zero now */
456  Scan--; /* step back one pointer */
457  }
458  }
459  }
460  if (NibblePosition) /* Odd number of nibbles? */
461  {
462  *StringPtr &= 0x0f; /* zero out the highest nibble */
463  }
464 
465  Scan = StringPtr; /* point to the string */
466  /* allocate a temp buffer */
467  Buffer = (RexxBuffer *)new_buffer(CurrentDigits + OVERFLOWSPACE + 1);
468  /* set accumulator pointer */
469  Accumulator = Buffer->getData() + CurrentDigits + OVERFLOWSPACE;
470  /* clear the buffer */
471  memset(Buffer->getData(), '\0', CurrentDigits + OVERFLOWSPACE + 1);
472  HighDigit = Accumulator - 1; /* set initial high point */
473 
474  while (StringLength--)
475  { /* while more digits */
476  ch = *Scan++; /* get the character */
477  /* add high order nibble */
478  HighDigit = RexxNumberString::addToBaseTen((ch & 0xf0) >> 4, Accumulator, HighDigit);
479  /* multiply by 16 */
480  HighDigit = RexxNumberString::multiplyBaseTen(Accumulator, HighDigit);
481  /* get accumulator length */
482  DecLength = (Accumulator - HighDigit);
483  if (DecLength > CurrentDigits)
484  { /* grown too long? */
485  if (type == true) /* c2d version? */
486  {
488  }
489  else /* this is the x2d function */
490  {
492  }
493  }
494  /* add high order nibble */
495  HighDigit = RexxNumberString::addToBaseTen(ch & 0x0f, Accumulator, HighDigit);
496  if (StringLength != 0) /* not the last one? */
497  {
498  /* multiply by 16 */
499  HighDigit = RexxNumberString::multiplyBaseTen(Accumulator, HighDigit);
500  }
501  /* get accumulator length */
502  DecLength = (Accumulator - HighDigit);
503  if (DecLength > CurrentDigits)
504  { /* grown too long? */
505  if (type == true) /* c2d version? */
506  {
508  }
509  else /* this is the x2d function */
510  {
512  }
513  }
514  }
515  /* get accumulator length */
516  DecLength = (Accumulator - HighDigit);
517  TempLength = DecLength; /* copy the length */
518  Scan = HighDigit + 1; /* point to the first digit */
519  while (TempLength--)
520  { /* make into real digits again */
521  /* add zero to each digit */
522  *Scan = *Scan + '0';
523  Scan++; /* step the pointer */
524  }
525 
526  ResultSize = DecLength; /* get the result size */
527  if (Negative) /* negative number? */
528  {
529  ResultSize++; /* add in space for the sign */
530  }
531  Retval = raw_string(ResultSize); /* allocate output buffer */
532  Scan = Retval->getWritableData(); /* point to output location */
533  if (Negative) /* need a sign? */
534  {
535  *Scan++ = '-'; /* add to the front */
536  }
537  /* copy in the number */
538  memcpy(Scan, Accumulator - DecLength + 1, DecLength);
539  return Retval; /* return converted string */
540 }
541 
543 /******************************************************************************/
544 /* Function: Common B2X processing routine */
545 /******************************************************************************/
546 {
547  RexxString *Retval; /* function result */
548  size_t Bits; /* number of bits in string */
549  const char *Source; /* current source pointer */
550  char *Destination; /* destination pointer */
551  size_t Excess; /* section boundary */
552  char Nibble[4]; /* current nibble string */
553  size_t Jump; /* string movement offset */
554  size_t Length; /* total string length */
555 
556  if (this->getLength() == 0) /* null input, i.e. zerolength */
557  {
558  Retval = OREF_NULLSTRING; /* return null */
559  }
560  else
561  { /* need to do conversion */
562  /* validate the string */
563  Bits = StringUtil::validateSet(this->getStringData(), this->getLength(), "01", 4, false);
564  /* allocate space for result */
565  Retval = raw_string((Bits + 3) / 4);
566  /* point to the data */
567  Destination = Retval->getWritableData();
568  Source = this->getStringData(); /* point to the source */
569  Length = this->getLength(); /* get the string length */
570 
571  while (Bits > 0)
572  { /* process the string */
573  Excess = Bits % 4; /* calculate section size */
574  if (Excess == 0) /* zero is a multiple of 4 */
575  {
576  Excess = 4; /* so use 4 */
577  }
578  else
579  {
580  memset(Nibble, '0', 4); /* pad the nibble with zeroes */
581  }
582  StringUtil::chGetSm(&Nibble[0] + (4 - Excess), Source, Length, Excess, "01", &Jump);
583  /* pack into destination */
584  *Destination++ = StringUtil::packNibble(Nibble);
585  Source += Jump; /* advance source pointer */
586  Length -= Jump; /* reduce remaining length */
587  Bits -= Excess; /* reduce remaining amount */
588  }
589  }
590  return Retval; /* return packed string */
591 }
592 
594 /******************************************************************************/
595 /* Function: Common C2D processing routine */
596 /******************************************************************************/
597 {
598  /* forward to the common routine */
599  return this->x2dC2d(_length, true);
600 }
601 
603 /******************************************************************************/
604 /* Function: Common X2B processing routine */
605 /******************************************************************************/
606 {
607  RexxString *Retval; /* function result */
608  size_t Nibbles; /* nibbles in hex string */
609  const char *Source; /* current source pointer */
610  char *Destination; /* destination pointer */
611  char Nibble[4]; /* current nibble string */
612  char ch; /* current string character */
613  int Val; /* converted nible */
614 
615  if (this->getLength() == 0) /* null input, i.e. zerolength */
616  {
617  /* string */
618  Retval = OREF_NULLSTRING; /* return null */
619  }
620  else
621  { /* have real data to pack */
622  Nibbles = StringUtil::validateSet(this->getStringData(), this->getLength(), "0123456789ABCDEFabcdef", 2, true);
623  Retval = raw_string(Nibbles * 4); /* allocate result string */
624  /* point to the data */
625  Destination = Retval->getWritableData();
626  Source = this->getStringData(); /* point to the source */
627 
628  while (Nibbles > 0)
629  { /* while still string to pack */
630  ch = *Source++; /* get current char and bump */
631  /* pointer */
632  if (ch != ch_SPACE && ch != ch_TAB)
633  { /* if not a filler space */
634  Val = StringUtil::hexDigitToInt(ch); /* convert hex to int first */
635  StringUtil::unpackNibble(Val, Nibble); /* then convert to binary */
636  /* digits */
637  /* copy to the destination */
638  memcpy(Destination, Nibble, 4);
639  Destination += 4; /* bump destination pointer */
640  Nibbles--; /* Reduce nibbles count */
641  }
642  }
643  }
644  return Retval; /* return the expanded string */
645 }
ch_TAB
#define ch_TAB
Definition: NumberStringClass.hpp:59
RexxObject::copy
RexxObject * copy()
Definition: ObjectClass.cpp:518
StringUtil.hpp
RexxString::c2d
RexxString * c2d(RexxInteger *)
Definition: StringClassConversion.cpp:593
Error_Incorrect_method_c2dbig
#define Error_Incorrect_method_c2dbig
Definition: RexxErrorCodes.h:487
StringLength
size_t RexxEntry StringLength(RexxThreadContext *c, RexxStringObject s)
Definition: ThreadContextStubs.cpp:1034
StringUtil::packHex
static RexxString * packHex(const char *String, size_t StringLength)
Definition: StringUtil.cpp:866
type
int type
Definition: cmdparse.cpp:1965
optionalLengthArgument
size_t optionalLengthArgument(RexxObject *o, size_t d, size_t p)
Definition: RexxCore.h:336
RexxString::x2d
RexxString * x2d(RexxInteger *)
Definition: StringClassConversion.cpp:301
IntToHexDigit
char IntToHexDigit(int n)
Definition: StringClass.hpp:113
ActivityManager.hpp
RexxString::getLength
size_t getLength()
Definition: StringClass.hpp:330
OVERFLOWSPACE
#define OVERFLOWSPACE
Definition: NumberStringClass.hpp:66
reportException
void reportException(wholenumber_t error)
Definition: ActivityManager.hpp:136
RexxString::getWritableData
char * getWritableData()
Definition: StringClass.hpp:334
RexxString::b2x
RexxString * b2x()
Definition: StringClassConversion.cpp:542
RexxString::x2b
RexxString * x2b()
Definition: StringClassConversion.cpp:602
RexxString::getStringData
const char * getStringData()
Definition: StringClass.hpp:333
RexxBuffer
Definition: BufferClass.hpp:91
IntegerZero
#define IntegerZero
Definition: RexxCore.h:188
RexxString::d2c
RexxString * d2c(RexxInteger *)
Definition: StringClassConversion.cpp:252
RexxString::x2dC2d
RexxString * x2dC2d(RexxInteger *, bool)
Definition: StringClassConversion.cpp:311
Error_Incorrect_method_invbase64
#define Error_Incorrect_method_invbase64
Definition: RexxErrorCodes.h:508
RexxString::decodeBase64
RexxString * decodeBase64()
Definition: StringClassConversion.cpp:126
raw_string
RexxString * raw_string(stringsize_t l)
Definition: StringClass.hpp:529
RexxString::numberString
RexxNumberString * numberString()
Definition: StringClass.cpp:366
RexxString::d2x
RexxString * d2x(RexxInteger *)
Definition: StringClassConversion.cpp:268
ARG_ONE
const int ARG_ONE
Definition: RexxCore.h:80
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
RexxString::encodeBase64
RexxString * encodeBase64()
Definition: StringClassConversion.cpp:63
RexxString::c2x
RexxString * c2x()
Definition: StringClassConversion.cpp:210
StringClass.hpp
StringUtil::unpackNibble
static void unpackNibble(int Val, char *p)
Definition: StringUtil.cpp:928
NumberStringMath.hpp
StringUtil::hexDigitToInt
static int hexDigitToInt(char ch)
Definition: StringUtil.cpp:609
RexxNumberString::addToBaseTen
static char * addToBaseTen(int, char *, char *)
Definition: NumberStringMath.cpp:1189
Error_Incorrect_method_x2dbig
#define Error_Incorrect_method_x2dbig
Definition: RexxErrorCodes.h:486
ch_SPACE
#define ch_SPACE
Definition: StringClass.hpp:88
Error_Incorrect_method_d2c
#define Error_Incorrect_method_d2c
Definition: RexxErrorCodes.h:481
Error_Incorrect_method_d2x
#define Error_Incorrect_method_d2x
Definition: RexxErrorCodes.h:480
RexxBuffer::getData
virtual char * getData()
Definition: BufferClass.hpp:105
RexxNumberString
Definition: NumberStringClass.hpp:93
RexxNumberString::d2xD2c
RexxString * d2xD2c(RexxObject *, bool)
Definition: NumberStringClass.cpp:3358
StringUtil::packNibble
static char packNibble(const char *String)
Definition: StringUtil.cpp:659
new_buffer
RexxBuffer * new_buffer(size_t s)
Definition: BufferClass.hpp:116
number_digits
size_t number_digits()
Definition: Numerics.hpp:147
RexxNumberString::multiplyBaseTen
static char * multiplyBaseTen(char *, char *)
Definition: NumberStringMath.cpp:1227
RexxCore.h
StringUtil::validateSet
static size_t validateSet(const char *String, size_t Length, const char *Set, int Modulus, bool Hex)
Definition: StringUtil.cpp:717
RexxString::x2c
RexxString * x2c()
Definition: StringClassConversion.cpp:284
RexxInteger
Definition: IntegerClass.hpp:56
BufferClass.hpp
StringUtil::chGetSm
static size_t chGetSm(char *Destination, const char *Source, size_t Length, size_t Count, const char *Set, size_t *ScannedSize)
Definition: StringUtil.cpp:826
RexxString
Definition: StringClass.hpp:119