X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fstring.hh;fp=src%2Fmoof%2Fstring.hh;h=d666aa1eba748037ddb79100d384c7d375dfb877;hp=0000000000000000000000000000000000000000;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/moof/string.hh b/src/moof/string.hh new file mode 100644 index 0000000..d666aa1 --- /dev/null +++ b/src/moof/string.hh @@ -0,0 +1,49 @@ + +/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +**] All rights reserved. +* +* vi:ts=4 sw=4 tw=75 +* +* Distributable under the terms and conditions of the 2-clause BSD license; +* see the file COPYING for a complete text of the license. +* +**************************************************************************/ + +#ifndef _MOOF_STRING_HH_ +#define _MOOF_STRING_HH_ + +/** + * \file string.hh + * Functions related to string manipulations. + */ + +#include + + +namespace moof { + + +using std::string; +using std::wstring; + + +/** + * Convert a multi-byte (UTF-8) string to a wide string. + * \param multi The multi-byte string to convert. + * \return The equivalent wide string. + */ +wstring multi_to_wide(const string& multi); + +/** + * Convert a wide string to a multi-byte (UTF-8) string. + * \param wide The wide string to convert. + * \return The equivalent multi-byte string. + */ +string wide_to_multi(const wstring& wide); + + +} // namespace moof + + +#endif // _MOOF_STRINGTOOLS_HH_ +