Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

String Rosetta Stone

Find a substring

nsString

FindInReadable(const nsAString& pattern, nsAString::const_iterator start, nsAString::const_iterator end, nsStringComparator& aComparator = nsDefaultStringComparator())

std::string

size_type find(const basic_string& s, size_type pos = 0) const
size_type find(const charT* s, size_type pos, size_type n) const
size_type find(const charT* s, size_type pos = 0) const
size_type find(charT c, size_type pos = 0) const

QString

int QString::indexOf ( const QString & str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive ) const

Format a printf style string

nsString

AppendPrintf()

std::string

n/a

QString

QString & QString::sprintf ( const char * cformat, ... )

Document Tags and Contributors

 Contributors to this page: jrmuizel
 Last updated by: jrmuizel,