Skip to content

Instantly share code, notes, and snippets.

@son0nline
son0nline / ArrayJoin.cs
Created May 31, 2022 03:46
ArrayList join
using System.Collections;
using System.Collections.Generic;
public class ArrayJoin{
public ArrayJoin()
{
ArrayList arrayList = new ArrayList();
arrayList.Add(1);
arrayList.Add("two");
@son0nline
son0nline / VietNamChar.js
Created April 12, 2021 03:30
js: bỏ dấu Tiếng Việt
function removeVietnameseChar(str, bRPunctuations) {
// Bỏ các khoảng trắng liền nhau
str = str.replace(/ + /g, " ");
str = str.trim();
// Bỏ dấu tiếng Việt
str = str.replace(/à|á|||ã|â||||||ă|||||/g, "a");
str = str.replace(/è|é||||ê||ế|||/g, "e");
str = str.replace(/ì|í|||ĩ/g, "i");
str = str.replace(/ò|ó|||õ|ô||||||ơ|||||/g, "o");