diff options
author | Marc Laukien <marc@zeroc.com> | 2004-04-09 16:38:00 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-04-09 16:38:00 +0000 |
commit | 09c33fa2189c2b538d6618d4bd78d6e6e32b5c3a (patch) | |
tree | 6220806dfb1a26ca3f54dd13f810202f99d28156 /cpp/include/IceUtil/StringUtil.h | |
parent | add opContext test (diff) | |
download | ice-09c33fa2189c2b538d6618d4bd78d6e6e32b5c3a.tar.bz2 ice-09c33fa2189c2b538d6618d4bd78d6e6e32b5c3a.tar.xz ice-09c33fa2189c2b538d6618d4bd78d6e6e32b5c3a.zip |
moved StringUtil to IceUtil, fixed names
Diffstat (limited to 'cpp/include/IceUtil/StringUtil.h')
-rw-r--r-- | cpp/include/IceUtil/StringUtil.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cpp/include/IceUtil/StringUtil.h b/cpp/include/IceUtil/StringUtil.h new file mode 100644 index 00000000000..6959020e8b7 --- /dev/null +++ b/cpp/include/IceUtil/StringUtil.h @@ -0,0 +1,45 @@ +// ********************************************************************** +// +// Copyright (c) 2003 +// ZeroC, Inc. +// Billerica, MA, USA +// +// All Rights Reserved. +// +// Ice is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License version 2 as published by +// the Free Software Foundation. +// +// ********************************************************************** + +#ifndef ICE_STRING_UTIL_H +#define ICE_STRING_UTIL_H + +#include <IceUtil/Config.h> + +namespace IceUtil +{ + +// +// Add escape sequences (like "\n", or "\0xxx") to make a string +// readable in ASCII. +// +std::string escapeString(const std::string&, const std::string&); + +// +// Remove escape sequences added by escapeString. +// +bool unescapeString(const std::string&, std::string::size_type, std::string::size_type, std::string&); + +// +// If a single or double quotation mark is found at the start +// position, then the position of the matching closing quote is +// returned. If no quotation mark is found at the start position, then +// 0 is returned. If no matching closing quote is found, then +// std::string::npos is returned. +// +std::string::size_type checkQuote(const std::string&, std::string::size_type = 0); + +} + +#endif |