git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@768593
283d02a7-25f6-0310-bc7c-
ecb5cbfe19da
return String(wstring(begin, end + 1));
}
+bool String::isLatin1() const
+{
+ for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); it++) {
+ if(*it >= 256)
+ return false;
+ }
+ return true;
+}
+
+bool String::isAscii() const
+{
+ for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); it++) {
+ if(*it >= 128)
+ return false;
+ }
+ return true;
+}
+
String String::number(int n) // static
{
if(n == 0)
*/
String stripWhiteSpace() const;
+ /*!
+ * Returns true if the file only uses characters required by Latin1.
+ */
+ bool isLatin1() const;
+
+ /*!
+ * Returns true if the file only uses characters required by (7-bit) ASCII.
+ */
+ bool isAscii() const;
+
/*!
* Converts the base-10 integer \a n to a string.
*/