]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Thu, 22 Dec 2011 00:21:31 +0000 (16:21 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 22 Dec 2011 00:21:31 +0000 (16:21 -0800)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/services/plugins/dndcp/stringxx/string.cc
open-vm-tools/services/plugins/dndcp/stringxx/string.hh

index 9833b4ab448ad6f6171771100f5b92891c3bf5b3..5bb34dcb17dfdc4cf9da7ccd703137c970dddbf9 100644 (file)
@@ -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();
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
index a0d5db145c6619a870cc08944807bd4b49d478cc..3189053081d59b5b6f3d2352f282bd6ed6007824 100644 (file)
@@ -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;