C
Qul::String Class
class Qul::StringThe String class provides an interface to the Qt Quick Ultralite APIs. More...
| Header: | #include <qul/unicodestring.h> |
| Since: | Qt Quick Ultralite 2.12 |
Public Functions
| String() | |
| String(const Qul::StdStringType &value) | |
| String(const char *utf8) | |
| String(const std::string &value) |
Related Non-Members
Detailed Description
The String class is designed as an interface type. Its main use case is as a function parameter type. It allows a single function to accept a wide variety of string data sources.
Member Function Documentation
String::String()
Constructs an empty latin1 string with 0 length.
String::String(const Qul::StdStringType &value)
Constructs a string from the StdStringType parameter.
String initializes a new StdStringType which copies the string data from the referenced StdStringType.
See also Building Qt Quick Ultralite from sources.
String::String(const char *utf8)
Constructs a view on a UTF-8 string.
The Qt Quick Ultralite string does not own the data but acts as a view to the data. When used as a data member, care must be taken to ensure that the referenced string data outlives the String on all code paths.
String::String(const std::string &value)
Constructs a string from std::string.
String initializes a new std::string which copies the string data from the referenced std::string.
See also Building Qt Quick Ultralite from sources.
Related Non-Members
StdStringType
The StdStringType is a type definition for a std::string using Qt Quick Ultralite memory custom allocator.
Application developers who wish to use a std::string and see its allocation size added to the Memory footprint logging, should use this typedef to declare their string variables.
A String constructor accepts a parameter of this type.
Available under certain Qt licenses.
Find out more.