formZ SDK | 5.0 API Reference | System | Runtime Library (FZRT) | Utility

fzrt_cnvt_str

Description

Converts a string. This will convert a string from one character set to another. The resulting string is placed in the same buffer as the source string. The buffer containing the string must be large enough to hold the destination string, it will not be resized. This function will optionally convert line endings to the current platform default. macintosh line ending are carriage return (0x13) Windows line endings is a pair of carriage return and line feed (0x13,0x10)

Plugin Prototype

fzrt_error_td fzrt_cnvt_str(

char *

str,

fzrt_charset_td

src_cs,

fzrt_charset_td

out_cs,

fzrt_int

str_size,

fzrt_int *

out_len,

fzrt_unsigned_int

cnvt_flags )

Parameters

str [Input, Result]

buffer containing the NULL terminated string on input and the converted string return

src_cs [Input]

character set of the input string

out_cs [Input]

character set of the resulting string

str_size [Input]

size of the string buffer

out_len [Result]

pointer to fzrt_int that receives size of the resulting string in bytes not including null terminator

cnvt_flags [Input]

FZRT_CNVT_NO_CRLF to leave carriage return/line feed as is, otherwise they are converted to current platform default

Returns

FZRT_NOERR on success, an error id otherwise.

Availability

5.0.0.0

Function Set

fz_fzrt_util_fset


Defined in

fzrt_api.h