diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2005-07-05 11:09:55 +0000 |
commit | 9b8cc712d4a41d71840416776bc94ee8485bb9b3 (patch) | |
tree | 7d467fdd6a66bc2b5878d82070d45adbd5c20414 /cppe/include/IceE/StringUtil.h | |
parent | cleaning the cache method out of ReferenceFactory (diff) | |
download | ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.bz2 ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.xz ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.zip |
Changed Ice to IceE EVERYWHERE!!!
Diffstat (limited to 'cppe/include/IceE/StringUtil.h')
-rw-r--r-- | cppe/include/IceE/StringUtil.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/cppe/include/IceE/StringUtil.h b/cppe/include/IceE/StringUtil.h new file mode 100644 index 00000000000..433f04779d0 --- /dev/null +++ b/cppe/include/IceE/StringUtil.h @@ -0,0 +1,48 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICEE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef ICEE_STRING_UTIL_H +#define ICEE_STRING_UTIL_H + +#include <IceE/Config.h> + +namespace IceE +{ + +// +// Add escape sequences (like "\n", or "\0xxx") to make a string +// readable in ASCII. +// +ICEE_API std::string escapeString(const std::string&, const std::string&); + +// +// Remove escape sequences added by escapeString. +// +ICEE_API 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. +// +ICEE_API std::string::size_type checkQuote(const std::string&, std::string::size_type = 0); + +// +// Match `s' against the pattern `pat'. A * in the pattern acts +// as a wildcard: it matches any non-empty sequence of characters +// other than a period (`.'). We match by hand here because +// it's portable across platforms (whereas regex() isn't). +// +ICEE_API bool match(const std::string&, const std::string&, bool = false); + +} + +#endif |