XBinder  Version 2.6.x
rtxCharStr.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2003-2018 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 
147 EXTERNRT const char* rtxStrJoin
148 (char* dest, size_t bufsiz, const char* str1, const char* str2,
149  const char* str3, const char* str4, const char* str5);
150 
163 EXTERNRT char* rtxStrDynJoin
164 (OSCTXT* pctxt, const char* str1, const char* str2,
165  const char* str3, const char* str4, const char* str5);
166 
173 EXTERNRT char* rtxStrTrimEnd (char* s);
174 
185 EXTERNRT int rtxIntToCharStr
186 (OSINT32 value, char* dest, size_t bufsiz, char padchar);
187 
198 EXTERNRT int rtxUIntToCharStr
199 (OSUINT32 value, char* dest, size_t bufsiz, char padchar);
200 
201 #if !defined(_NO_INT64_SUPPORT)
202 
212 EXTERNRT int rtxInt64ToCharStr
213 (OSINT64 value, char* dest, size_t bufsiz, char padchar);
214 
225 EXTERNRT int rtxUInt64ToCharStr
226 (OSUINT64 value, char* dest, size_t bufsiz, char padchar);
227 
228 #endif /* !defined(_NO_INT64_SUPPORT) */
229 
240 EXTERNRT int rtxSizeToCharStr
241 (size_t value, char* dest, size_t bufsiz, char padchar);
242 
253 EXTERNRT int rtxHexCharsToBinCount (const char* hexstr, size_t nchars);
254 
267 EXTERNRT int rtxHexCharsToBin
268 (const char* hexstr, size_t nchars, OSOCTET* binbuf, size_t bufsize);
269 
279 EXTERNRT int rtxCharStrToInt (const char* cstr, OSINT32* pvalue);
280 
293 EXTERNRT int rtxCharStrnToInt
294 (const char* cstr, OSSIZE ndigits, OSINT32* pvalue);
295 
305 EXTERNRT int rtxCharStrToInt8 (const char* cstr, OSINT8* pvalue);
306 
317 EXTERNRT int rtxCharStrToInt16 (const char* cstr, OSINT16* pvalue);
318 
329 EXTERNRT int rtxCharStrToInt64 (const char* cstr, OSINT64* pvalue);
330 
341 EXTERNRT int rtxCharStrToUInt (const char* cstr, OSUINT32* pvalue);
342 
353 EXTERNRT int rtxCharStrToUInt8 (const char* cstr, OSUINT8* pvalue);
354 
365 EXTERNRT int rtxCharStrToUInt16 (const char* cstr, OSUINT16* pvalue);
366 
377 EXTERNRT int rtxCharStrToUInt64 (const char* cstr, OSUINT64* pvalue);
378 
382 #ifdef __cplusplus
383 }
384 #endif
385 
386 #endif
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 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:185
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.