Skip to content

Instantly share code, notes, and snippets.

@antons
antons / HUTF8MappedUTF16String.h
Created November 19, 2017 16:56 — forked from rsms/HUTF8MappedUTF16String.h
Convert a UTF-16 string to UTF-8, mapping indices to provide low-complexity range and index lookups
#ifndef H_UTF8_MAPPED_UTF16_STRING_H_
#define H_UTF8_MAPPED_UTF16_STRING_H_
#import <Foundation/Foundation.h>
#import <string>
/*
* Convert a UTF-16 string to UTF-8, mapping indices to provide low-complexity
* range and index lookups.
*