All Projects → preco21 → StringConvert

preco21 / StringConvert

Licence: Unlicense License
A simple C++11 based helper for converting string between a various charset

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to StringConvert

alawmulaw
A-Law and mu-Law codecs in JavaScript.
Stars: ✭ 22 (+37.5%)
Mutual labels:  encode, decode
time decode
A timestamp and date decoder written for python 3
Stars: ✭ 24 (+50%)
Mutual labels:  encode, decode
He
A robust HTML entity encoder/decoder written in JavaScript.
Stars: ✭ 2,973 (+18481.25%)
Mutual labels:  encode, decode
node-lei-proto
简单的Buffer编码/解析模块
Stars: ✭ 14 (-12.5%)
Mutual labels:  encode, decode
morse
Morse Code Library in Go
Stars: ✭ 75 (+368.75%)
Mutual labels:  encode, decode
Silk V3 Decoder
kn007's blog
Stars: ✭ 1,832 (+11350%)
Mutual labels:  encode, decode
Androidcamera
🔥🔥🔥自定义Android相机(仿抖音 TikTok),其中功能包括视频人脸识别贴纸,美颜,分段录制,视频裁剪,视频帧处理,获取视频关键帧,视频旋转,添加滤镜,添加水印,合成Gif到视频,文字转视频,图片转视频,音视频合成,音频变声处理,SoundTouch,Fmod音频处理。 Android camera(imitation Tik Tok), which includes video editor,audio editor,video face recognition stickers, segment recording,video cropping, video frame processing, get the first video frame, key frame, v…
Stars: ✭ 2,112 (+13100%)
Mutual labels:  encode, decode
fastproto
FastProto is a binary data processing tool written in Java.
Stars: ✭ 65 (+306.25%)
Mutual labels:  encode, decode
janus-gateway-live
RTMP edge speed with janus-gateway
Stars: ✭ 38 (+137.5%)
Mutual labels:  encode, decode
utf8-validator
UTF-8 Validator
Stars: ✭ 18 (+12.5%)
Mutual labels:  unicode, charset
libutf8
A whatwg compliant UTF8 encoding and decoding library
Stars: ✭ 32 (+100%)
Mutual labels:  encode, decode
FireSnapshot
A useful Firebase-Cloud-Firestore Wrapper with Codable.
Stars: ✭ 56 (+250%)
Mutual labels:  encode, decode
crypthash-net
CryptHash.NET is a .NET multi-target library to encrypt/decrypt/hash/encode/decode strings and files, with an optional .NET Core multiplatform console utility.
Stars: ✭ 33 (+106.25%)
Mutual labels:  encode, decode
record-encode-audio-from-browser
Record/Encode Audio on Browser using the WebAudio API and "ported" libraries.
Stars: ✭ 55 (+243.75%)
Mutual labels:  encode
UniObfuscator
Java obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
Stars: ✭ 40 (+150%)
Mutual labels:  unicode
unzalgo
Transforms ť͈̓̆h̏̔̐̑ì̭ͯ͞s̈́̄̑͋ into this without breaking internationalization.
Stars: ✭ 38 (+137.5%)
Mutual labels:  unicode
2048-rs
Rust implementation of 2048 game
Stars: ✭ 15 (-6.25%)
Mutual labels:  unicode
contour
Modern C++ Terminal Emulator
Stars: ✭ 761 (+4656.25%)
Mutual labels:  unicode
unicode-emoji-json
Emoji data from unicode.org as easily consumable JSON files.
Stars: ✭ 149 (+831.25%)
Mutual labels:  unicode
stringx
Drop-in replacements for base R string functions powered by stringi
Stars: ✭ 14 (-12.5%)
Mutual labels:  unicode

StringConvert

A simple C++11 based helper for converting string between a various charset

C++11 implemented compiler required

Methods

// WBCS to MBCS
static std::string wideStringToAnsiString(const std::wstring& wstring, const std::locale& locale = std::locale{""});

// MBCS to WBCS
static std::wstring ansiStringToWideString(const std::string& string, const std::locale& locale = std::locale{""});

// UTF-8 -> UTF-16
static std::u16string u8StringToU16String(const std::string& u8String);

// UTF-8 -> UTF-32
static std::u32string u8StringToU32String(const std::string& u8String);

// UTF-16 -> UTF-8
static std::string u16StringToU8String(const std::u16string& u16String);

// UTF-16 -> UTF-32
static std::u32string u16StringToU32String(const std::u16string& u16String);

// UTF-32 -> UTF-8
static std::string u32StringToU8String(const std::u32string& u32String);

// UTF-32 -> UTF-16
static std::u16string u32StringToU16String(const std::u32string& u32String);

Usage

#include "StringConvert.hpp"
#include <iostream>

int main()
{
  std::cout << StringConvert::wideStringToAnsiString(L"히이이익!") << std::endl;
  return 0;
}

Trouble Shooting

Some cases you should set locales, see details:

License

Public Domain

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].