Revision: 52312
Updated Code
at October 19, 2011 23:38 by hejaaa
Updated Code
function removeDiacritics(text:String, lowerCase:Boolean = false):String { var mapDi:String="áäà âÄçÄéěëèêÃïîĺľňóôöŕšťúůüùûýřžÃÄÀÂČÇĎÉĚËÈÊÃÃÎĹĽŇÓÔŒÖŔŠŤÚŮÜÙÛÃŘŽ"; var mapNo:String="aaaaccdeeeeeiiillnooorstuuuuuyrzAAAACCDEEEEEIIILLNOOSORSTUUUUUYRZ"; var strOut:String=""; lowerCase?text=text.toLocaleLowerCase():null; for (var i:uint = 0; i < text.length; i++) { if (mapDi.indexOf(text.charAt(i))!=-1) { strOut+=mapNo.charAt(mapDi.indexOf(text.charAt(i))); } else { strOut+=text.charAt(i); } } return strOut; }
Revision: 52311
Updated Code
at October 19, 2011 23:37 by hejaaa
Updated Code
function removeDiacritics(text:String, lowerCase:Boolean = false):String { var mapDi:String="áäàâÄ�çÄ�éÄ�ëèêÃÂïîĺľ�óôö�šťúůüùûý�ž���������������ĹĽ������ŠŤ�Ů�����Ž"; var mapNo:String="aaaaccdeeeeeiiillnooorstuuuuuyrzAAAACCDEEEEEIIILLNOOSORSTUUUUUYRZ"; var strOut:String=""; lowerCase?text=text.toLocaleLowerCase():null; for (var i:uint = 0; i < text.length; i++) { if (mapDi.indexOf(text.charAt(i))!=-1) { strOut+=mapNo.charAt(mapDi.indexOf(text.charAt(i))); } else { strOut+=text.charAt(i); } } return strOut; }
Revision: 52310
Updated Code
at October 19, 2011 20:18 by hejaaa
Updated Code
function removeDiacritics(text:String, lowerCase:Boolean = false):String { var mapDi:String="áäà âÄçÄéěëèêÃïîĺľňóôöŕšťúůüùûýřžÃÄÀÂČÇĎÉĚËÈÊÃÃÎĹĽŇÓÔŒÖŔŠŤÚŮÜÙÛÃŘŽ"; var mapNo:String="aaaaccdeeeeeiiillnooorstuuuuuyrzAAAACCDEEEEEIIILLNOOSORSTUUUUUYRZ"; var strOut:String=""; lowerCase?text=text.toLocaleLowerCase():null; for (var i:uint = 0; i < text.length; i++) { if (mapDi.indexOf(text.charAt(i))!=-1) { strOut+=mapNo.charAt(mapDi.indexOf(text.charAt(i))); } else { strOut+=text.charAt(i); } } return strOut; }
Revision: 52309
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 19, 2011 20:01 by hejaaa
Initial Code
function removeDiacritics(text:String, lowerCase:Boolean = false):String { var mapDi:String="áäÄÄéěÃĺľňóô öŕšťúů üýřžÃÄČĎÉĚÃĹĽŇÓÔ ÖŔŠŤÚŮ ÃœÃŘŽ"; var mapNo:String="aacdeeillnoo orstuu uyrzAACDEEILLNOO ORSTUU UYRZ"; var strOut:String=""; lowerCase?text=text.toLocaleLowerCase():null; for (var i:uint = 0; i < text.length; i++) { if (mapDi.indexOf(text.charAt(i))!=-1) { strOut+=mapNo.charAt(mapDi.indexOf(text.charAt(i))); } else { strOut+=text.charAt(i); } } return strOut; }
Initial URL
Initial Description
remove diacritics with the possibility convert to lowercase
Initial Title
Remove diacritics
Initial Tags
Initial Language
ActionScript 3