soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SStrCpCvt Class Reference

Class for string code page conversion. More...

#include <strcpcvt.h>

Static Public Member Functions

static SStringA CvtW2A (const SStringW &str, unsigned int cp=0)
 Converts a wide string (UTF-16) to a multi-byte string (ANSI or specified code page).
 
static SStringW CvtA2W (const SStringA &str, unsigned int cp=0, unsigned int cp2=0)
 Converts a multi-byte string (ANSI or specified code page) to a wide string (UTF-16).
 
static SStringA CvtA2A (const SStringA &str, unsigned int cpFrom=CP_UTF8, unsigned int cpTo=0)
 Converts a multi-byte string from one code page to another multi-byte code page.
 
static SStringW CvtW2W (const SStringW &str, unsigned int cp=0)
 Converts a wide string (UTF-16) to another wide string (UTF-16) with a specified code page.
 

Detailed Description

Class for string code page conversion.

Provides static methods to convert strings between different code pages.

Definition at line 20 of file strcpcvt.h.

Member Function Documentation

◆ CvtA2A()

SStringA SStrCpCvt::CvtA2A ( const SStringA & str,
unsigned int cpFrom = CP_UTF8,
unsigned int cpTo = 0 )
static

Converts a multi-byte string from one code page to another multi-byte code page.

Parameters
strMulti-byte string to convert.
cpFromSource code page (default is CP_UTF8).
cpToTarget code page (default is CP_ACP).
Returns
Converted multi-byte string.

Definition at line 10 of file strcpcvt.cpp.

◆ CvtA2W()

SStringW SStrCpCvt::CvtA2W ( const SStringA & str,
unsigned int cp = 0,
unsigned int cp2 = 0 )
static

Converts a multi-byte string (ANSI or specified code page) to a wide string (UTF-16).

Parameters
strMulti-byte string to convert.
cpCode page of the input multi-byte string (default is CP_ACP).
cp2Reserved parameter (default is 0).
Returns
Converted wide string.

Definition at line 18 of file strcpcvt.cpp.

◆ CvtW2A()

SStringA SStrCpCvt::CvtW2A ( const SStringW & str,
unsigned int cp = 0 )
static

Converts a wide string (UTF-16) to a multi-byte string (ANSI or specified code page).

Parameters
strWide string to convert.
cpCode page for the output multi-byte string (default is CP_ACP).
Returns
Converted multi-byte string.

Definition at line 42 of file strcpcvt.cpp.

◆ CvtW2W()

SNSBEGIN SStringW SStrCpCvt::CvtW2W ( const SStringW & str,
unsigned int cp = 0 )
static

Converts a wide string (UTF-16) to another wide string (UTF-16) with a specified code page.

Parameters
strWide string to convert.
cpCode page for the output wide string (default is CP_ACP).
Returns
Converted wide string.

Definition at line 5 of file strcpcvt.cpp.


The documentation for this class was generated from the following files: