Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

KWString.h File Reference

Unicode strings. More...

#include "ktypes.h"

Defines

#define KWString_new(len)   _KWString_new (len, __K_FILE__, __K_LINE__)
 Returns a string of length given as a parameter plus 1. All the characters of the string are equal to ''.

Functions

KTL_API KWString _KWString_new (const KInt64 len, KString sFile, KInt iLine)
 Returns a string of length given as a parameter plus 1. All the characters of the string are equal to ''.
KTL_API k_size_t k_wcslen (KWString str)
 Gets the length of a string.
KTL_API KInt k_wcscmp (KWString str1, KWString str2)
 Compares twos strings.
KTL_API KWString k_wcsdup (KWString src)
 Duplicates the given string.
KTL_API KWString k_wcsstr (KWString strToken, KWString strDelim)
 Returns the first occurrence of a search string in a string.
KTL_API k_size_t k_mbstowcs (KWString wstr, KCString str, k_size_t size)
 The multi-byte character string is interpreted character by character and translated to an equivalent.
KTL_API k_size_t k_wcstombs (KString str, KWString wstr, k_size_t size)
 The string is interpreted character by character and translated to its multi-byte equivalent.


Detailed Description

Unicode strings.

Version:
KToolLib-1.0
Author:
Laurent Primaux
Date:
03/12/2008
Note:
Copyright © 2008-2010 iKlax Media SAS (www.iklaxmedia.com). All rights reserved.

Define Documentation

#define KWString_new len   )     _KWString_new (len, __K_FILE__, __K_LINE__)
 

Returns a string of length given as a parameter plus 1. All the characters of the string are equal to ''.

Parameters:
len the length of the string to be created
Returns:
the created string if successful otherwise knull


Function Documentation

KTL_API KWString _KWString_new const KInt64  len,
KString  sFile,
KInt  iLine
 

Returns a string of length given as a parameter plus 1. All the characters of the string are equal to ''.

Parameters:
len the length of the string to be created
sFile the file name where this function is called
iLine the line number where this function is called
Returns:
the created string if successful otherwise knull

KTL_API k_size_t k_mbstowcs KWString  wstr,
KCString  str,
k_size_t  size
 

The multi-byte character string is interpreted character by character and translated to an equivalent.

Parameters:
wstr the resulting string
str the multi-byte character string to be interpreted
size the maximum number of characters to be interpreted
Returns:
the number of characters translated, not including the ending null-character if successful otherwise -1

KTL_API KInt k_wcscmp KWString  str1,
KWString  str2
 

Compares twos strings.

Parameters:
str1 the first null-character terminated string
str2 the second null-character terminated string
Returns:
an integral value indicating the relationship between the strings. A zero value indicates that both strings are equal. A value greater than zero indicates that the first character that does not match has a greater value in the first string than in the second one. And a value less than zero indicates the opposite

KTL_API KWString k_wcsdup KWString  src  ) 
 

Duplicates the given string.

Parameters:
src the null-character terminated string
Returns:
the copied string if successful otherwise knull

KTL_API k_size_t k_wcslen KWString  str  ) 
 

Gets the length of a string.

Parameters:
str the null-character terminated string
Returns:
the number of characters in the string excluding the null-character if successful otherwise -1

KTL_API KWString k_wcsstr KWString  strToken,
KWString  strDelim
 

Returns the first occurrence of a search string in a string.

Parameters:
strToken the null-character terminated string to search
strDelim the null-character terminated string to search for
Returns:
the first occurrence of the search string in the string if successful otherwise knull

KTL_API k_size_t k_wcstombs KString  str,
KWString  wstr,
k_size_t  size
 

The string is interpreted character by character and translated to its multi-byte equivalent.

Parameters:
str the resulting string
wstr the string to be translated
size the maximum number of bytes to be written
Returns:
the number of bytes translated and written, not including the ending null-character if successful otherwise -1


Generated on Tue Mar 9 10:49:30 2010 for iKlax Tools Library (KToolLib) by doxygen 1.3.8