13.3.3 String vars

The String vars in the member functions described in this section and in the section Sequence vars have a TYPE of char *. String vars support additional member functions, as follows:

String_var(char * str)
This constructor makes a String_var from a string. The str argument specifies the string that will be assumed. The user must not use the str pointer to access data.
String_var(const char * str) String_var(const String_var &var)
This constructor makes a String_var from a const string. The str argument specifies the const string that will be copied. The var argument specifies a reference to the string to be copied.
String_var &operator=(char * str)
This assignment operator first releases the contained string using CORBA::string_free, and then assumes ownership of the input string. The str argument specifies the string whose ownership will be assumed by this String_var object.
String_var &operator=(const char * str) String_var &operator=(const String_var &var)
This assignment operator first releases the contained string using CORBA::string_free, and then copies the input string. The Data argument specifies the string whose ownership will be assumed by this String_var object.
char operator[] (Ulong Index) char operator[] (Ulong Index) const
These array operators are superscripting operators that provide access to characters within the string. The Index argument specifies the index of the array to use in accessing a particular character within the array. Zero-based indexing is used. The returned value of the Char operator[] (Ulong Index) function can be used as an lvalue. The returned value of the Char operator[] (Ulong Index) const function cannot be used as an lvalue.