company logo

String :: String - Constructor

The Constructor provides several implementations in order to create strings from different source formats.

Implementation overview

Implementation details

  1. Create string from 64 bit integer value
    String  :: String ( int64 i64Value )
    • i64Value - Big integer value

      Big integer values are 64 bit integer values.

  2. to list
  3. Create string from double (float) value
    String  :: String ( double vDouble )
    • vDouble - Double value
  4. to list
  5. Create string from 32 bit integer value
    String  :: String ( int32 iValue )
    • iValue - Integer value

      The value is passed as platform independent 32-bit integer value.

  6. to list
  7. - internal feature (not documented)
    String  :: String ( int32 iValue, odaba::String &iMask )
    • iValue - Integer value

      The value is passed as platform independent 32-bit integer value.

    • iMask - Integer mask

      The mask defines formatting rules when converting integer to string:

      • 9 - show integer including leading 0
      • Z - show integer or ' ' for leading zeros
      • S - show sign (+ or -)
      • any other - show character as in mask
  8. to list
  9. Create sized string
    String  :: String ( char *cBuffer, int32 iSize )

    The constructor creates a string with the size passed in cSize. The string value is copied from cBuffer with length cSize.

    • cBuffer - Character buffer

      The character buffer is a pointer to an area usually containing ASCII characters. The area does not have a string terminator and buffer size is required in order to extract data from the area.

    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

  10. to list
  11. Create string for single character
    String  :: String ( char cchar )

    The function creates a String from the character value passed in cchar.

    • cchar - Single character value

      The single character value is considered to be an 8 bit local encoded character value. When necessary, character values are transformed into unicode code points or other requested coding types.

  12. to list
  13. Create string with numbers of characters
    String  :: String ( char cchar, int32 iCount )

    The constructor creates a string from the character passed in cchar repeating it iCount times.

    • cchar - Single character value

      The single character value is considered to be an 8 bit local encoded character value. When necessary, character values are transformed into unicode code points or other requested coding types.

    • iCount - Number of items

      The value contains the number of items to be processed or stored in a collection.

  14. to list
  15. Create string with specific encoding type
    String  :: String ( odaba::StringCodingTypes eStringCodingType )

    The constructor creates a string with the encoding type passed in eStringCodingType.

    • eStringCodingType - String encoding type

      In case of unknown text encoding type undefinedCoding is used.

  16. to list
  17. Copy constructor
    String  :: String ( odaba::String &cString )

    The copy constructor copies the string value passed in cString to the string object to be created.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  18. to list
  19. Creates an empty string
    String  :: String (  )
  20. to list
  21. - internal feature (not documented)
    String  :: String ( odaba::Key &cKey )
    • cKey - Key value

      A key value is the key definition and a value for the key. The key value is typically provided in ESDF format. Other formats might be set (OIF, XML)

  22. to list
  23. Create substring from string
    String  :: String ( odaba::String &cString, int32 iPosition, int32 iSize )

    The function creates a string by copying the sub string from the string value passed in cString. from position iPosition with length iSize. When the size exceeds the length of the passed string, the maximum size available in the remaining part of the string is used. When iSize is negative, an exception is thrown. When iSize is 0, an empty string will be created.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

  24. to list
  25. Create UTF16 string from buffer
    String  :: String ( utf16char *utf16buffer, int32 iSize )

    The function creates an UTF16 encoded string from the string value passed in utf16buffer. The area provided in the parameter must contain a valid UTF16 string. iSize units of the string are copied unless the string is terminated by 0 before.

    • utf16buffer - UTF16 string buffer

      The pointer refers to an area containing an UTF16 string value. The string need not to be 0-terminated.

    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

  26. to list
  27. Create string from 0-terminated UTF16 string
    String  :: String ( utf16char *utf16str )

    The function creates an UTF16 encoded string from the string value passed in utf16string. The area provided in the parameter must contain a valid 0-terminated UTF16 string.

    • utf16str - 0-terminated UTF16 string

      The pointer refers to an area containing a 0-terminated UTF16 string value.

  28. to list
  29. Create string from UTF32 buffer
    String  :: String ( utf32char *utf32buffer, int32 iSize )

    The function creates an UTF32 encoded string from the string value passed in utf32buffer. The area provided in the parameter must contain a valid UTF32 string. iSize units of the string are copied unless the string is terminated by 0 before.

    • utf32buffer - - internal feature (not documented)
    • iSize - Size

      Size of the instance or property area. For string objects, the size is usually measured in units.

  30. to list
  31. Create string from 0-terminated UTF32 string
    String  :: String ( utf32char *utf32str )

    The function creates an UTF32 encoded string from the string value passed in utf32string. The area provided in the parameter must contain a valid 0-terminated UTF32 string.

    • utf32str - - internal feature (not documented)
  32. to list
  33. Create string from vlaue
    String  :: String ( odaba::Value &cValue )

    The constructor creates a string from the value passed in cValue. The function corresponds to the function Value::toString(). Non text values are converted into strings. Text data is copied maintaining the encoding type defined in the value. Non text data is provided as ASCII string.

    • cValue - Value handle

      A value handle refers to a (usually) opened value. Invalid value handles may cause an exception.

  34. to list