Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » UltraLite - C and C++ Programming » API Reference » UltraLite C++ API Reference » ULValue class

 

GetStringLength function

Synopsis
size_t ULValue::GetStringLength(
  bool fetch_as_chars
)
Parameters
  • fetch_as_chars¬†¬† False for byte length, true for char length.

Remarks

Gets the length of a String.

Intended usage is as follows:

          len = v.GetStringLength();
          dst = new char[ len + 1 ];
          ( dst, len + 1 ); GetString

For wide character applications the usage is:

          len = v.GetStringLength( true );
          dst = new ul_wchar[ len + 1 ];
          ( dst, len + 1 ); GetString

Returns
  • The number of bytes or characters required to hold the string returned by one of the GetString function methods, not including the null-terminator.