company logo

String :: fromCString - Convert string from C-string

C-strings are strings that could be defined as string constant in a C program. C-strings must not contain several characters, wich are converted as follows in order to normalize the string:

  • \\ ==> \
    • \n ==> newline (10)
  • \r ==> carriage return (13)
    • \b ==> backspace (8)
    • \f ==> form feed (12)
    • \t ==> tab (9)
  • \" ==> "

Conversion is done inplace. In order to create a C-string toCString() may be called.

Return value:  String value ( odaba::String & )

Implementation details

odaba::String String  :: fromCString (  )