X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Futils.h;fp=source%2Futils.h;h=44c2edb86c19abcaa003498e7385f31a911b3822;hp=5492f9558ea4b22a36fcee2a4bcc437c4cfd4b88;hb=f9e0275e476540c1b5d61c03a6a87d521856059b;hpb=f5aa787e1a715867a8024816ccd58e9a4c7e23a4 diff --git a/source/utils.h b/source/utils.h index 5492f95..44c2edb 100644 --- a/source/utils.h +++ b/source/utils.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of libmspstrings -Copyright © 2006-2007 Mikko Rasa +Copyright © 2006-2008 Mikko Rasa Distributed under the LGPL */ @@ -33,6 +33,28 @@ Converts a string to upper case. */ std::string toupper(const std::string &); +/** +Checks whether a string consists of digits only. +*/ +bool isnumrc(const std::string &); + +/** +Checks whether a string consists of alphabetic characters only. +*/ +bool isalpha(const std::string &); + +/** +Checks whether a string consists of alphanumeric characters only. +*/ +bool isalnum(const std::string &); + +/* These are required to make the standard version work from inside the Msp +namespace */ +using std::tolower; +using std::toupper; +using std::isalpha; +using std::isalnum; + /** Splits a string at occurrences of any of the characters in sep. If max_split is non-negative, at most that many split will be performed, i.e. the resulting