XBinder  Version 2.9.x
rtxCharStr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2022 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
33 #ifndef _RTXCHARSTR_H_
34 #define _RTXCHARSTR_H_
35 
36 #include "rtxsrc/rtxContext.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
51 EXTERNRT int rtxStricmp (const char* str1, const char* str2);
52 
63 EXTERNRT int rtxStrnicmp (const char* str1, const char* str2, size_t count);
64 
75 EXTERNRT char* rtxStrcat (char* dest, size_t bufsiz, const char* src);
76 
88 EXTERNRT char* rtxStrncat
89 (char* dest, size_t bufsiz, const char* src, size_t nchars);
90 
101 EXTERNRT char* rtxStrcpy (char* dest, size_t bufsiz, const char* src);
102 
118 EXTERNRT char* rtxStrncpy
119 (char* dest, size_t bufsiz, const char* src, size_t nchars);
120 
132 EXTERNRT char* rtxStrdup (OSCTXT* pctxt, const char* src);
133 
146 EXTERNRT char* rtxStrndup (OSCTXT* pctxt, const char* src, OSSIZE nchars);
147 
161 EXTERNRT const char* rtxStrJoin
162 (char* dest, size_t bufsiz, const char* str1, const char* str2,
163  const char* str3, const char* str4, const char* str5);
164 
177 EXTERNRT char* rtxStrDynJoin
178 (OSCTXT* pctxt, const char* str1, const char* str2,
179  const char* str3, const char* str4, const char* str5);
180 
187 EXTERNRT char* rtxStrTrimEnd (char* s);
188 
206 EXTERNRT int rtxValidateConstrainedStr(OSCTXT *pctxt, const char *pvalue,
207  const char *pCharSet);
208 
219 EXTERNRT int rtxIntToCharStr
220 (OSINT32 value, char* dest, size_t bufsiz, char padchar);
221 
232 EXTERNRT int rtxUIntToCharStr
233 (OSUINT32 value, char* dest, size_t bufsiz, char padchar);
234 
235 #if !defined(_NO_INT64_SUPPORT)
236 
246 EXTERNRT int rtxInt64ToCharStr
247 (OSINT64 value, char* dest, size_t bufsiz, char padchar);
248 
259 EXTERNRT int rtxUInt64ToCharStr
260 (OSUINT64 value, char* dest, size_t bufsiz, char padchar);
261 
262 #endif /* !defined(_NO_INT64_SUPPORT) */
263 
274 EXTERNRT int rtxSizeToCharStr
275 (size_t value, char* dest, size_t bufsiz, char padchar);
276 
287 EXTERNRT int rtxHexCharsToBinCount (const char* hexstr, size_t nchars);
288 
301 EXTERNRT int rtxHexCharsToBin
302 (const char* hexstr, size_t nchars, OSOCTET* binbuf, size_t bufsize);
303 
313 EXTERNRT int rtxCharStrToInt (const char* cstr, OSINT32* pvalue);
314 
327 EXTERNRT int rtxCharStrnToInt
328 (const char* cstr, OSSIZE ndigits, OSINT32* pvalue);
329 
339 EXTERNRT int rtxCharStrToInt8 (const char* cstr, OSINT8* pvalue);
340 
351 EXTERNRT int rtxCharStrToInt16 (const char* cstr, OSINT16* pvalue);
352 
363 EXTERNRT int rtxCharStrToInt64 (const char* cstr, OSINT64* pvalue);
364 
375 EXTERNRT int rtxCharStrToUInt (const char* cstr, OSUINT32* pvalue);
376 
387 EXTERNRT int rtxCharStrToUInt8 (const char* cstr, OSUINT8* pvalue);
388 
399 EXTERNRT int rtxCharStrToUInt16 (const char* cstr, OSUINT16* pvalue);
400 
411 EXTERNRT int rtxCharStrToUInt64 (const char* cstr, OSUINT64* pvalue);
412 
416 #ifdef __cplusplus
417 }
418 #endif
419 
420 #endif
EXTERNRT char * rtxStrndup(OSCTXT *pctxt, const char *src, OSSIZE nchars)
This function creates a duplicate copy of up to the given number of characters in a string...
EXTERNRT int rtxCharStrToUInt16(const char *cstr, OSUINT16 *pvalue)
This function converts the given character string to an unsigned 16-bit integer value.
EXTERNRT int rtxCharStrToInt64(const char *cstr, OSINT64 *pvalue)
This function converts the given character string to a signed 64-bit integer value.
EXTERNRT int rtxCharStrToUInt64(const char *cstr, OSUINT64 *pvalue)
This function converts the given character string to an unsigned 64-bit integer value.
EXTERNRT int rtxUInt64ToCharStr(OSUINT64 value, char *dest, size_t bufsiz, char padchar)
This function converts an unsigned 64-bit integer into a character string.
EXTERNRT char * rtxStrTrimEnd(char *s)
This function trims whitespace from the end of a string.
EXTERNRT char * rtxStrdup(OSCTXT *pctxt, const char *src)
This function creates a duplicate copy of a null-terminated string.
EXTERNRT int rtxCharStrToInt(const char *cstr, OSINT32 *pvalue)
This function converts the given character string to a signed 32-bit integer value.
EXTERNRT int rtxUIntToCharStr(OSUINT32 value, char *dest, size_t bufsiz, char padchar)
This function converts an unsigned 32-bit integer into a character string.
EXTERNRT int rtxCharStrnToInt(const char *cstr, OSSIZE ndigits, OSINT32 *pvalue)
This function converts up to the given number of digits from the given character string to a signed 3...
EXTERNRT int rtxHexCharsToBin(const char *hexstr, size_t nchars, OSOCTET *binbuf, size_t bufsize)
This function converts the given hex string to binary.
Common run-time context definitions.
EXTERNRT int rtxIntToCharStr(OSINT32 value, char *dest, size_t bufsiz, char padchar)
This function converts a signed 32-bit integer into a character string.
EXTERNRT int rtxSizeToCharStr(size_t value, char *dest, size_t bufsiz, char padchar)
This function converts a value of type 'size_t' into a character string.
EXTERNRT char * rtxStrncpy(char *dest, size_t bufsiz, const char *src, size_t nchars)
This function copies the given number of characters from a string to a target buffer.
EXTERNRT int rtxHexCharsToBinCount(const char *hexstr, size_t nchars)
This function returns a count of the number of bytes the would result from the conversion of a hexade...
EXTERNRT int rtxStricmp(const char *str1, const char *str2)
This is an implementation of the non-standard stricmp function.
EXTERNRT int rtxStrnicmp(const char *str1, const char *str2, size_t count)
This is an implementation of the non-standard stricmp function.
EXTERNRT char * rtxStrcat(char *dest, size_t bufsiz, const char *src)
This function concatanates the given string onto the string buffer.
EXTERNRT int rtxCharStrToInt8(const char *cstr, OSINT8 *pvalue)
This function converts the given character string to a signed 8-bit integer value.
EXTERNRT int rtxValidateConstrainedStr(OSCTXT *pctxt, const char *pvalue, const char *pCharSet)
This function will validate a constrained character string by checking to see if all the characters i...
EXTERNRT char * rtxStrncat(char *dest, size_t bufsiz, const char *src, size_t nchars)
This function concatanates the given number of characters from the given string onto the string buffe...
EXTERNRT char * rtxStrcpy(char *dest, size_t bufsiz, const char *src)
This function copies a null-terminated string to a target buffer.
EXTERNRT char * rtxStrDynJoin(OSCTXT *pctxt, const char *str1, const char *str2, const char *str3, const char *str4, const char *str5)
This function allocates memory for and concatanates up to five substrings together into a single stri...
EXTERNRT int rtxCharStrToInt16(const char *cstr, OSINT16 *pvalue)
This function converts the given character string to a signed 16-bit integer value.
Run-time context structure.
Definition: rtxContext.h:198
EXTERNRT int rtxCharStrToUInt(const char *cstr, OSUINT32 *pvalue)
This function converts the given character string to an unsigned 32-bit integer value.
EXTERNRT int rtxCharStrToUInt8(const char *cstr, OSUINT8 *pvalue)
This function converts the given character string to an unsigned 8-bit integer value.
EXTERNRT const char * rtxStrJoin(char *dest, size_t bufsiz, const char *str1, const char *str2, const char *str3, const char *str4, const char *str5)
This function concatanates up to five substrings together into a single string.
EXTERNRT int rtxInt64ToCharStr(OSINT64 value, char *dest, size_t bufsiz, char padchar)
This function converts a signed 64-bit integer into a character string.