Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreStrings.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_STRINGS__
8 #define __HDI_CORE_STRINGS__
9 
10 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace core
17  {
18  namespace strings
19  {
20  typedef std::vector<std::string> StringVector;
21 
31  uint32_t substrCount(const std::string& str_, const std::string& substr_);
32 
43  bool split(const std::string& str_, const std::string& delim_, StringVector& elements__);
44 
53  std::string trim(const std::string& str_);
54 
63  std::string uppercase(const std::string& str_);
64 
73  std::string lowercase(const std::string& str_);
74 
86  std::string replaceAll(const std::string& subject_, const std::string& search_, const std::string& replace_);
87 
96  UTF16String utf8ToUTF16(const UTF8String& str_);
97 
106  UTF32String utf8ToUTF32(const UTF8String& str_);
107 
116  UTF8String utf16ToUTF8(const UTF16String& str_);
117 
126  UTF32String utf16ToUTF32(const UTF16String& str_);
127 
136  UTF8String utf32ToUTF8(const UTF32String& str_);
137 
146  UTF16String utf32ToUTF16(const UTF32String& str_);
147  }
148  }
149 }
150 
151 #endif
152 // __HDI_CORE_STRINGS__
std::string UTF8String
Typedef of std::string as UTF8String.
Definition: hdicoreTypes.h:67
std::string lowercase(const std::string &str_)
Lowercases an entire string, returning a duplicate.
UTF8String utf16ToUTF8(const UTF16String &str_)
Converts the given UTF-16 string to a UTF-8 string.
std::string uppercase(const std::string &str_)
Uppercases an entire string, returning a duplicate.
UTF8String utf32ToUTF8(const UTF32String &str_)
Converts the given UTF-32 string to a UTF-8 string.
std::string trim(const std::string &str_)
Trims the whitespace from both ends of a string, returning a duplicate.
UTF32String utf8ToUTF32(const UTF8String &str_)
Converts the given UTF-8 string to a UTF-32 string.
UTF16String utf32ToUTF16(const UTF32String &str_)
Converts the given UTF-32 string to a UTF-16 string.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
std::string replaceAll(const std::string &subject_, const std::string &search_, const std::string &replace_)
Replaces all instances of a search string, in a subject string, with a given replacement.
UTF32String utf16ToUTF32(const UTF16String &str_)
Converts the given UTF-16 string to a UTF-32 string.
Definition: hdicoreaiArray.h:12
UTF16String utf8ToUTF16(const UTF8String &str_)
Converts the given UTF-8 string to a UTF-16 string.
std::basic_string< UTF16Char > UTF16String
Typedef of std::basic_string<UTF16Char> as UTF16String.
Definition: hdicoreTypes.h:84
bool split(const std::string &str_, const std::string &delim_, StringVector &elements__)
Tokenizes a string by a given substring delimiter.
std::basic_string< UTF32Char > UTF32String
Typedef of std::basic_string<UTF32Char> as UTF32String.
Definition: hdicoreTypes.h:94
uint32_t substrCount(const std::string &str_, const std::string &substr_)
Gets the number of times a substring occurs in a given string.