Turkish case conversion in JavaScript

Coming back to this years later to provide more up to date solution. There is no need for the hack below, just use String.toLocaleUpperCase() and String.toLocaleLowerCase() “dinç”.toLocaleUpperCase(‘tr-TR’) // “DİNÇ” All modern browsers support this now. [ OLD, DO NOT USE THIS ] Try these functions String.prototype.turkishToUpper = function(){ var string = this; var letters = … Read more

Use Java and RegEx to convert casing in a string

You can’t do this in Java regex. You’d have to manually post-process using String.toUpperCase() and toLowerCase() instead. Here’s an example of how you use regex to find and capitalize words of length at least 3 in a sentence String text = “no way oh my god it cannot be”; Matcher m = Pattern.compile(“\\b\\w{3,}\\b”).matcher(text); StringBuilder sb … Read more

Android ActionBar MenuItem LowerCase

Solution for native ActionBar implementation: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <style name=”MyTheme” parent=”android:Theme.Holo”> <item name=”android:actionMenuTextAppearance”>@style/MyMenuTextAppearance</item> </style> <style name=”MyMenuTextAppearance” parent=”android:TextAppearance.Holo.Widget.ActionBar.Menu”> <item name=”android:textAllCaps”>false</item> </style> </resources> If you are using ActionBarSherlock there are two different approaches: 1) Create boolean resource abs__config_actionMenuItemAllCaps and set it to false: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <bool name=”abs__config_actionMenuItemAllCaps”>false</bool> </resources> 2) Or create theme with overriden … Read more