String class reference
[Base module]
Declaration
#include <QtLua/String>
namespace QtLua {
class String;
};
This class is a member of the QtLua namespace.
Description
Lua use 8 bits character strings so QString is not suitable for QtLua.
This class is used as string object in the QtLua project. It is based on QByteArray with added conversion facilities.
This class is also used as exceptions type for exceptions associated with lua errors.
Members
Functions
- String()
- String(const char *s)
- String(const char *s, int size)
- String(const QByteArray &s)
- String(const QString &s)
- String & arg(const String &arg)
- String & arg(int arg)
- operator const char*() const
- QString to_qstring() const
Members detail
Create an empty string
Create a string from const char *
Create a string from const char * with given length
String(const QByteArray &s)
Create a string from QByteArray
String(const QString &s)
Copy constructor
Replace next % character in string with given string
String & arg(int arg)
Replace next % character in string with given integer
const char * cast operator
QString to_qstring() const
QString cast operator