This class provides function allowing to convert Apple-platform specific string objects.
More...
#include <StringApple.h>
|
| static NSString * | toNSString (const std::string &value) |
| | Converts a given string to a NSString object.
|
| |
| static NSString * | toNSString (const std::wstring &value) |
| | Converts a given string to a NSString object.
|
| |
| static std::string | toUTF8 (NSString *object) |
| | Converts a given NSString object to a string with UTF8 encoding.
|
| |
| static std::wstring | toWString (NSString *object) |
| | Converts a given NSString object to a string with 32 bit character encoding.
|
| |
| static std::string | toUTF8 (CFStringRef object) |
| | Converts a given CFStringRef object to a string with UTF8 encoding.
|
| |
| static std::wstring | toWString (CFStringRef object) |
| | Converts a given CFStringRef object to a string with 32 bit character encoding.
|
| |
| static std::string | toAString (const std::wstring &value) |
| | Converts a value to a string with 8bit character.
|
| |
| static std::wstring | toWString (const std::string &value) |
| | Converts a value to a wstring.
|
| |
This class provides function allowing to convert Apple-platform specific string objects.
Beware: This class is implemented for Apple-platforms only and therefore, it is recommended to use this class in non-header files only to reduce issues with the Objective C compiler.
◆ toAString()
| static std::string Ocean::StringApple::toAString |
( |
const std::wstring & |
value | ) |
|
|
static |
Converts a value to a string with 8bit character.
- Parameters
-
| value | The value to convert |
- Returns
- Converted string
◆ toNSString() [1/2]
| static NSString * Ocean::StringApple::toNSString |
( |
const std::string & |
value | ) |
|
|
static |
Converts a given string to a NSString object.
- Parameters
-
| value | The string to convert, may be empty |
- Returns
- The resulting converted string object
◆ toNSString() [2/2]
| static NSString * Ocean::StringApple::toNSString |
( |
const std::wstring & |
value | ) |
|
|
static |
Converts a given string to a NSString object.
- Parameters
-
| value | The string to convert, may be empty |
- Returns
- The resulting converted string object
◆ toUTF8() [1/2]
| static std::string Ocean::StringApple::toUTF8 |
( |
CFStringRef |
object | ) |
|
|
static |
Converts a given CFStringRef object to a string with UTF8 encoding.
- Parameters
-
| object | The string object to convert, may be nullptr |
- Returns
- The resulting string with UTF8 encoding
◆ toUTF8() [2/2]
| static std::string Ocean::StringApple::toUTF8 |
( |
NSString * |
object | ) |
|
|
static |
Converts a given NSString object to a string with UTF8 encoding.
- Parameters
-
| object | The string object to convert, may be nullptr |
- Returns
- The resulting string with UTF8 encoding
◆ toWString() [1/3]
| static std::wstring Ocean::StringApple::toWString |
( |
CFStringRef |
object | ) |
|
|
static |
Converts a given CFStringRef object to a string with 32 bit character encoding.
- Parameters
-
| object | The string object to convert, may be nullptr |
- Returns
- The resulting string with 32 bit character encoding
◆ toWString() [2/3]
| static std::wstring Ocean::StringApple::toWString |
( |
const std::string & |
value | ) |
|
|
static |
Converts a value to a wstring.
- Parameters
-
| value | The value to convert |
- Returns
- Converted string
◆ toWString() [3/3]
| static std::wstring Ocean::StringApple::toWString |
( |
NSString * |
object | ) |
|
|
static |
Converts a given NSString object to a string with 32 bit character encoding.
- Parameters
-
| object | The string object to convert, may be nullptr |
- Returns
- The resulting string with 32 bit character encoding
The documentation for this class was generated from the following file: