Encoding utilities.  
 More...
#include <encoding.h>
 | 
| static std::string  | ToUTF8 (std::wstring_view wstr) | 
|   | Convert system wide-string to UTF-8 encoded string.  
  | 
|   | 
| static std::wstring  | FromUTF8 (std::string_view str) | 
|   | Convert UTF-8 encoded string to system wide-string.  
  | 
|   | 
| static std::u16string  | UTF8toUTF16 (std::string_view str) | 
|   | Convert UTF-8 encoded string to UTF-16 encoded string.  
  | 
|   | 
| static std::u32string  | UTF8toUTF32 (std::string_view str) | 
|   | Convert UTF-8 encoded string to UTF-32 encoded string.  
  | 
|   | 
| static std::string  | UTF16toUTF8 (std::u16string_view str) | 
|   | Convert UTF-16 encoded string to UTF-8 encoded string.  
  | 
|   | 
| static std::u32string  | UTF16toUTF32 (std::u16string_view str) | 
|   | Convert UTF-16 encoded string to UTF-32 encoded string.  
  | 
|   | 
| static std::string  | UTF32toUTF8 (std::u32string_view str) | 
|   | Convert UTF-32 encoded string to UTF-8 encoded string.  
  | 
|   | 
| static std::u16string  | UTF32toUTF16 (std::u32string_view str) | 
|   | Convert UTF-32 encoded string to UTF-16 encoded string.  
  | 
|   | 
| static std::string  | Base16Encode (std::string_view str) | 
|   | Base16 encode string.  
  | 
|   | 
| static std::string  | Base16Decode (std::string_view str) | 
|   | Base16 decode string.  
  | 
|   | 
| static std::string  | Base32Encode (std::string_view str) | 
|   | Base32 encode string.  
  | 
|   | 
| static std::string  | Base32Decode (std::string_view str) | 
|   | Base32 decode string.  
  | 
|   | 
| static std::string  | Base64Encode (std::string_view str) | 
|   | Base64 encode string.  
  | 
|   | 
| static std::string  | Base64Decode (std::string_view str) | 
|   | Base64 decode string.  
  | 
|   | 
| static std::string  | URLEncode (std::string_view str) | 
|   | URL encode string.  
  | 
|   | 
| static std::string  | URLDecode (std::string_view str) | 
|   | URL decode string.  
  | 
|   | 
Encoding utilities. 
Encoding utilities contains methods for UTF-8, UTF-16, UTF-32 encoding conversions.
Thread-safe. 
Definition at line 23 of file encoding.h.
 
◆ Encoding() [1/3]
  
  
      
        
          | CppCommon::Encoding::Encoding  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
delete   | 
  
 
 
◆ Encoding() [2/3]
  
  
      
        
          | CppCommon::Encoding::Encoding  | 
          ( | 
          const Encoding &  | 
           | ) | 
           | 
         
       
   | 
  
delete   | 
  
 
 
◆ Encoding() [3/3]
  
  
      
        
          | CppCommon::Encoding::Encoding  | 
          ( | 
          Encoding &&  | 
           | ) | 
           | 
         
       
   | 
  
delete   | 
  
 
 
◆ ~Encoding()
  
  
      
        
          | CppCommon::Encoding::~Encoding  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
delete   | 
  
 
 
◆ Base16Decode()
  
  
      
        
          | std::string CppCommon::Encoding::Base16Decode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base16 decode string. 
- Parameters
 - 
  
    | str | - Base16 encoded string  | 
  
   
- Returns
 - Decoded string 
 
Definition at line 165 of file encoding.cpp.
 
 
◆ Base16Encode()
  
  
      
        
          | std::string CppCommon::Encoding::Base16Encode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base16 encode string. 
- Parameters
 - 
  
  
 
- Returns
 - Base16 encoded string 
 
Definition at line 144 of file encoding.cpp.
 
 
◆ Base32Decode()
  
  
      
        
          | std::string CppCommon::Encoding::Base32Decode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base32 decode string. 
- Parameters
 - 
  
    | str | - Base32 encoded string  | 
  
   
- Returns
 - Decoded string 
 
Definition at line 296 of file encoding.cpp.
 
 
◆ Base32Encode()
  
  
      
        
          | std::string CppCommon::Encoding::Base32Encode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base32 encode string. 
- Parameters
 - 
  
  
 
- Returns
 - Base32 encoded string 
 
Definition at line 218 of file encoding.cpp.
 
 
◆ Base64Decode()
  
  
      
        
          | std::string CppCommon::Encoding::Base64Decode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base64 decode string. 
- Parameters
 - 
  
    | str | - Base64 encoded string  | 
  
   
- Returns
 - Decoded string 
 
Definition at line 428 of file encoding.cpp.
 
 
◆ Base64Encode()
  
  
      
        
          | std::string CppCommon::Encoding::Base64Encode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Base64 encode string. 
- Parameters
 - 
  
  
 
- Returns
 - Base64 encoded string 
 
Definition at line 397 of file encoding.cpp.
 
 
◆ FromUTF8()
  
  
      
        
          | std::wstring CppCommon::Encoding::FromUTF8  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-8 encoded string to system wide-string. 
System wide-string could be UTF-16 (Windows) or UTF-32 (Unix).
- Parameters
 - 
  
    | str | - UTF-8 encoded string to convert  | 
  
   
- Returns
 - System wide-string 
 
- Examples
 - string_encoding.cpp.
 
Definition at line 43 of file encoding.cpp.
 
 
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ToUTF8()
  
  
      
        
          | std::string CppCommon::Encoding::ToUTF8  | 
          ( | 
          std::wstring_view  | 
          wstr | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert system wide-string to UTF-8 encoded string. 
System wide-string could be UTF-16 (Windows) or UTF-32 (Unix).
- Parameters
 - 
  
    | wstr | - System wide-string to convert  | 
  
   
- Returns
 - UTF-8 encoded string 
 
Definition at line 29 of file encoding.cpp.
 
 
◆ URLDecode()
  
  
      
        
          | std::string CppCommon::Encoding::URLDecode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
URL decode string. 
- Parameters
 - 
  
  
 
- Returns
 - Decoded string 
 
Definition at line 504 of file encoding.cpp.
 
 
◆ URLEncode()
  
  
      
        
          | std::string CppCommon::Encoding::URLEncode  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
URL encode string. 
- Parameters
 - 
  
  
 
- Returns
 - URL encoded string 
 
Definition at line 481 of file encoding.cpp.
 
 
◆ UTF16toUTF32()
  
  
      
        
          | std::u32string CppCommon::Encoding::UTF16toUTF32  | 
          ( | 
          std::u16string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-16 encoded string to UTF-32 encoded string. 
- Parameters
 - 
  
    | str | - UTF-16 encoded string to convert  | 
  
   
- Returns
 - UTF-32 encoded string 
 
Definition at line 93 of file encoding.cpp.
 
 
◆ UTF16toUTF8()
  
  
      
        
          | std::string CppCommon::Encoding::UTF16toUTF8  | 
          ( | 
          std::u16string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-16 encoded string to UTF-8 encoded string. 
- Parameters
 - 
  
    | str | - UTF-16 encoded string to convert  | 
  
   
- Returns
 - UTF-8 encoded string 
 
Definition at line 82 of file encoding.cpp.
 
 
◆ UTF32toUTF16()
  
  
      
        
          | std::u16string CppCommon::Encoding::UTF32toUTF16  | 
          ( | 
          std::u32string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-32 encoded string to UTF-16 encoded string. 
- Parameters
 - 
  
    | str | - UTF-32 encoded string to convert  | 
  
   
- Returns
 - UTF-16 encoded string 
 
Definition at line 125 of file encoding.cpp.
 
 
◆ UTF32toUTF8()
  
  
      
        
          | std::string CppCommon::Encoding::UTF32toUTF8  | 
          ( | 
          std::u32string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-32 encoded string to UTF-8 encoded string. 
- Parameters
 - 
  
    | str | - UTF-32 encoded string to convert  | 
  
   
- Returns
 - UTF-8 encoded string 
 
Definition at line 114 of file encoding.cpp.
 
 
◆ UTF8toUTF16()
  
  
      
        
          | std::u16string CppCommon::Encoding::UTF8toUTF16  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-8 encoded string to UTF-16 encoded string. 
- Parameters
 - 
  
    | str | - UTF-8 encoded string to convert  | 
  
   
- Returns
 - UTF-16 encoded string 
 
Definition at line 58 of file encoding.cpp.
 
 
◆ UTF8toUTF32()
  
  
      
        
          | std::u32string CppCommon::Encoding::UTF8toUTF32  | 
          ( | 
          std::string_view  | 
          str | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Convert UTF-8 encoded string to UTF-32 encoded string. 
- Parameters
 - 
  
    | str | - UTF-8 encoded string to convert  | 
  
   
- Returns
 - UTF-32 encoded string 
 
Definition at line 70 of file encoding.cpp.
 
 
The documentation for this class was generated from the following files: