Skip to content

Instantly share code, notes, and snippets.

View vietnguyen09's full-sized avatar

Johnny Nguyen vietnguyen09

  • Full-stack Developer
  • Hanoi, Vietnam
View GitHub Profile
@tomykaira
tomykaira / Base64.h
Last active March 30, 2024 11:04
C++ single header base64 decode/encoder for C++ 11 and above.
#ifndef _MACARON_BASE64_H_
#define _MACARON_BASE64_H_
/**
* The MIT License (MIT)
* Copyright (c) 2016-2024 tomykaira
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@redphx
redphx / compound-to-unicode.java
Created March 3, 2014 08:27
[Java] Chuyển tiếng Việt tổ hợp sang dựng sẵn
public static String compound2Unicode(String str) {
str = str.replaceAll("\u0065\u0309", "\u1EBB"); //ẻ
str = str.replaceAll("\u0065\u0301", "\u00E9"); //é
str = str.replaceAll("\u0065\u0300", "\u00E8"); //è
str = str.replaceAll("\u0065\u0323", "\u1EB9"); //ẹ
str = str.replaceAll("\u0065\u0303", "\u1EBD"); //ẽ
str = str.replaceAll("\u00EA\u0309", "\u1EC3"); //ể
str = str.replaceAll("\u00EA\u0301", "\u1EBF"); //ế
str = str.replaceAll("\u00EA\u0300", "\u1EC1"); //ề
str = str.replaceAll("\u00EA\u0323", "\u1EC7"); //ệ