Foxit PDF SDK

Public Member Functions | List of all members
CFX_WideStringC Class Reference
FXCRT

CONSTANT WIDE STRING CLASS. More...

Inherits CFX_Object.

Inherited by CFX_WideStringL.

## Public Member Functions
| CFX_WideStringC ()
| Constructs a null constant string.
| CFX_WideStringC (FX_LPCWSTR ptr)
| Construct from a character string. More...
| CFX_WideStringC (FX_WCHAR &ch)
| Construct from a single character. More...
| CFX_WideStringC (FX_LPCWSTR ptr, FX_STRSIZE len)
| Construct from a character string. More...
| CFX_WideStringC (const CFX_WideStringC &src)
| Copy constructor. More...
| CFX_WideStringC (const CFX_WideString &src)
| Construct from a wide string. More...
FX_WCHAR | GetAt (FX_STRSIZE index) const
| Retrieves a single byte specified by an index number. More...
FX_STRSIZE | GetLength () const
| Get the length of the byte string. More...
FX_LPCWSTR | GetPtr () const
| Get a constant wide string pointer to the wide string. More...
bool | IsEmpty () const
| Determines whether current string object is empty. More...
CFX_WideStringC | Left (FX_STRSIZE count) const
| Extracts the first (leftmost) count wide characters from this CFX_WideStringC object as a sub-string. More...
CFX_WideStringC | Mid (FX_STRSIZE index, FX_STRSIZE count=-1) const
| Extracts a substring of length count bytes from this CFX_WideStringC object, starting at position index (zero-based). More...
bool | operator != (const CFX_WideStringC &str) const
| Comparison(!=) operator overload. Case-sensitive. More...
CFX_WideStringC & | operator= (FX_LPCWSTR src)
| Assignment(=) operator overload. From a character string. More...
CFX_WideStringC & | operator= (const CFX_WideStringC &src)
| Assignment(=) operator overload. From a CFX_WideStringC object. More...
CFX_WideStringC & | operator= (const CFX_WideString &src)
| Assignment(=) operator overload. From a CFX_ByteString object. More...
bool | operator== (const CFX_WideStringC &str) const
| Comparison(==) operator overload. Case-sensitive. More...
CFX_WideStringC | Right (FX_STRSIZE count) const
| Extracts the last (rightmost) count wide characters from this CFX_WideStringC object as a sub-string. More...

## Detailed Description

CONSTANT WIDE STRING CLASS.

Constant wide string, it contains no buffer so its content can't be changed directly.

## Constructor & Destructor Documentation

## ◆ CFX_WideStringC() [1/4]

CFX_WideStringC::CFX_WideStringC | ( | FX_LPCWSTR | ptr | ) |
| inline

Construct from a character string.

Parameters

  [in] | ptr | Pointer to a constant character string, the string must be null-terminated.

## ◆ CFX_WideStringC() [2/4]

CFX_WideStringC::CFX_WideStringC | ( | FX_WCHAR & | ch | ) |
| inline

Construct from a single character.

Parameters

  [in] | ch | A single character.

## ◆ CFX_WideStringC() [3/4]

CFX_WideStringC::CFX_WideStringC | ( | FX_LPCWSTR | ptr,
|  | FX_STRSIZE | len
| ) |  |
| inline

Construct from a character string.

Parameters

  [in] | ptr | Pointer to a constant character string.
  [in] | len | The length of the character string. This can be -1 for null-terminated string.

## ◆ CFX_WideStringC() [4/4]

CFX_WideStringC::CFX_WideStringC | ( | const CFX_WideStringC & | src | ) |
| inline

Copy constructor.

Parameters

  [in] | src | constant ref to a CFX_WideStringC object.

## Member Function Documentation

## ◆ GetAt()

FX_WCHAR CFX_WideStringC::GetAt | ( | FX_STRSIZE | index | ) | const
| inline

Retrieves a single byte specified by an index number.

Parameters

  [in] | index | Specifies the zero-based index in the byte string.

Returns
  A single byte.

## ◆ GetLength()

FX_STRSIZE CFX_WideStringC::GetLength | ( |  | ) | const
| inline

Get the length of the byte string.

Returns
  The length of the byte string.

## ◆ GetPtr()

FX_LPCWSTR CFX_WideStringC::GetPtr | ( |  | ) | const
| inline

Get a constant wide string pointer to the wide string.

Returns
  A constant wide string pointer to the wide string.

## ◆ IsEmpty()

bool CFX_WideStringC::IsEmpty | ( |  | ) | const
| inline

Determines whether current string object is empty.

Returns
  true means current string object is empty, while false means not.

## ◆ Left()

CFX_WideStringC CFX_WideStringC::Left | ( | FX_STRSIZE | count | ) | const
| inline

Extracts the first (leftmost) count wide characters from this CFX_WideStringC object as a sub-string.

Parameters

  [in] | count | The count of wide characters expected to extract for the sub-string.

Returns
  A CFX_WideStringC sub-string.

## ◆ Mid()

CFX_WideStringC CFX_WideStringC::Mid | ( | FX_STRSIZE | index,
|  | FX_STRSIZE | count = `-1`
| ) |  | const
| inline

Extracts a substring of length count bytes from this CFX_WideStringC object, starting at position index (zero-based).

Parameters

  [in] | index | Specifies the zero-based index in the CFX_WideStringC object.
  [in] | count | Specifies the number of bytes to extract from this CFX_WideStringC object.

Returns
  A CFX_WideStringC object refer to the substring.

## ◆ operator !=()

bool CFX_WideStringC::operator != | ( | const CFX_WideStringC & | str | ) | const
| inline

Comparison(!=) operator overload. Case-sensitive.

Parameters

  [in] | str | constant ref to a CFX_WideStringC object.

Returns
  true means not equal, while false means equal.

## ◆ operator=() [1/2]

CFX_WideStringC& CFX_WideStringC::operator= | ( | FX_LPCWSTR | src | ) |
| inline

Assignment(=) operator overload. From a character string.

Parameters

  [in] | src | Pointer to a constant character string.

Returns
  A reference to current object itself.

## ◆ operator=() [2/2]

CFX_WideStringC& CFX_WideStringC::operator= | ( | const CFX_WideStringC & | src | ) |
| inline

Assignment(=) operator overload. From a CFX_WideStringC object.

Parameters

  [in] | src | constant ref to a CFX_ByteStringC object.

Returns
  A reference to current object itself.

## ◆ operator==()

bool CFX_WideStringC::operator== | ( | const CFX_WideStringC & | str | ) | const
| inline

Comparison(==) operator overload. Case-sensitive.

Parameters

  [in] | str | constant ref to a CFX_ByteStringC object.

Returns
  true means equal, while false means not equal.

## ◆ Right()

CFX_WideStringC CFX_WideStringC::Right | ( | FX_STRSIZE | count | ) | const
| inline

Extracts the last (rightmost) count wide characters from this CFX_WideStringC object as a sub-string.

Parameters

  [in] | count | The count of wide characters expected to extract for the sub-string.

Returns
  A CFX_WideStringC sub-string.