#include <QStringList>
Go to the source code of this file.
Functions | |
QStringList | char_array_to_stringlist (char **arr, int len) |
QString | ensure_valid_chars (QString str, QString validChars) |
QString | scrub_email_addr (QString email) |
bool | err (QString *str, QString errmsg) |
QString | string_wrap (QString str, int width, QString sep, QString le) |
Definition in file string.h.
QStringList char_array_to_stringlist | ( | char ** | arr, | |
int | len | |||
) |
Create a QStringList from the array of C-style strings.
Definition at line 33 of file string.cpp.
References i().
Referenced by main().
QString ensure_valid_chars | ( | QString | str, | |
QString | validChars | |||
) |
Ensures all characters in str are in validChars. If a character appears in str but not in validChars, it will be removed and the resulting string returned.
Definition at line 58 of file string.cpp.
References i().
Referenced by ServerSettings::getNickname(), and NicknameValidator::validate().
bool err | ( | QString * | str, | |
QString | errmsg | |||
) |
Conditionally assigns errmsg to str if str is not null and returns false. This is a seemingly pointless function, but it saves some messiness in methods whose QString *errmsg parameter is optional.
Definition at line 46 of file string.cpp.
Referenced by ControlSocket::connect(), ControlSocket::disconnect(), GeoIpCache::loadFromDisk(), LogFile::open(), ControlSocket::readLine(), ControlSocket::readLineData(), ControlSocket::readReply(), GeoIpCache::saveToDisk(), ControlConnection::send(), ControlSocket::sendCommand(), touch_file(), and write_pidfile().
QString scrub_email_addr | ( | QString | ) |
Scrubs an email address by replacing "@" with " at " and "." with " dot ".
Definition at line 72 of file string.cpp.
Referenced by ServerSettings::confValues().
QString string_wrap | ( | QString | str, | |
int | width, | |||
QString | sep, | |||
QString | le | |||
) |
Wraps str at width characters wide, using sep as the word separator (" ", for example), and placing the line ending le at the end of each line, except the last.
Definition at line 84 of file string.cpp.
Referenced by LogTreeItem::setMessage().