Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QString::truncate ( int  position  ) 

Truncates the string at the given position index.

If the specified position index is beyond the end of the string, nothing happens.


snippets/qstring/main.cpp Widget::truncateFunction() QString str // str == "Vlad"

See also:
chop(), resize(), left()

Definition at line 3734 of file qstring.cpp.

References resize().

Referenced by QDBusAbstractInterface::callWithArgumentList(), QSqlDriver::formatValue(), fromUtf8(), Q3ListView::keyPressEvent(), Q3Url::setFileName(), simplified(), QAbstractSpinBox::sizeHint(), Q3MultiLineEdit::textLine(), toLower(), QKeySequence::toString(), toUpper(), and vsprintf().

    if (pos < d->size)

Generated by  Doxygen 1.6.0   Back to index