From: VMware, Inc <> Date: Thu, 22 Dec 2011 00:21:31 +0000 (-0800) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.12.20-562307~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=febe3ad8a9cb2c9c60862babf0952da94cf5b01b;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc index 9833b4ab4..5bb34dcb1 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.cc +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.cc @@ -741,6 +741,30 @@ string::empty() } +/* + *----------------------------------------------------------------------------- + * + * utf::string::isASCII -- + * + * Test if every character in the string is in the ASCII range. + * + * Results: + * true if all ASCII, otherwise false. + * + * Side effects: + * None + * + *----------------------------------------------------------------------------- + */ + +bool +string::isASCII() + const +{ + return mUstr.is_ascii(); +} + + /* *----------------------------------------------------------------------------- * diff --git a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh index a0d5db145..318905308 100644 --- a/open-vm-tools/services/plugins/dndcp/stringxx/string.hh +++ b/open-vm-tools/services/plugins/dndcp/stringxx/string.hh @@ -130,6 +130,7 @@ public: void swap(string &s); void resize(size_type n, value_type c = '\0'); bool empty() const; + bool isASCII() const; size_type size() const; size_type w_size() const; size_type length() const;