Qt logo

QConstString Class Reference


A QString which uses constant Unicode data. More...

#include <qstring.h>

List of all member functions.

Public Members


Detailed Description

A QString which uses constant Unicode data.

In order to minimize copying, highly optimized applications can use QConstString to provide a QString-compatible object from existing Unicode data. The Unicode data must exist for the entire lifetime of the QConstString object.


Member Function Documentation

QConstString::QConstString(QChar*unicode, uintlength)

Creates a QConstString that uses the first length Unicode characters in the array unicode. Any attempt to modify copies of the string will cause it to create a copy of the data, thus it remains forever unmodified.

QConstString::~QConstString()

Destroys the QConstString, creating a copy of the data if other strings are still using it.

constQString&QConstString::string()const

Returns a constant string referencing the data passed during construction.


Search the documentation, FAQ, qt-interest archive and more (uses www.troll.no):


This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.


Copyright 1999 Troll TechTrademarks
Qt version 2.0.2