lowercase

Turkish case conversion in JavaScript

对着背影说爱祢 提交于 2019-11-28 05:49:31
I want to convert strings to lower or upper case in JavaScript in the locale I wanted. I think standard functions like toUpperCase() and toLocaleUpperCase() do not satisfy this need. toLocale functions do not behave as they should. For example, in Safari 4, Chrome 4 Beta, Firefox 3.5.x on my system it converts strings with Turkish characters incorrectly. The browsers respond to navigator.language as "en-US" , "tr" , "en-US" respectively. But there is no way to get user's Accept-Lang setting in the browser as far as I could found. Only Chrome gives me "tr" although I have configured every

Laravel Eloquent Ignore Casing

只愿长相守 提交于 2019-11-28 02:46:31
问题 I am trying to run a query using Eloquent the $vars['language'] is in lower case but the language column is not necessarily in lower case. How can i do this search using eloquent but still have the lower case in the query Item::where('language', $vars['language']) What i want to do is this even though i can't find anywhere how to do this Item::where('LOWER(language)', $vars['language']) so that they are both in lowercase and then i can get them to match. 回答1: Use whereRaw with parameter

IIS URL rewrite module url's to lowercase

。_饼干妹妹 提交于 2019-11-28 02:45:34
问题 For better SEO we are using URL rewrite to convert all the URL's to lowercase. I set this one as mentioned in this the below article. Everything is working fine from URL perspective, but we see lot of 301 redirects when we check in fiddler. It looks like the images, javascript, css, jquery ajax calls and everything is getting converted into lower case. I am trying to remove that and want to rewrite only aspx extension and no extension urls. I tried to play around the matchurl without any

How to convert a string to lower or upper case in Ruby

两盒软妹~` 提交于 2019-11-28 02:32:56
How do I take a string and convert it to lower or upper case in Ruby? Sophie Alpert Ruby has a few methods for changing the case of strings. To convert to lowercase, use downcase : "hello James!".downcase #=> "hello james!" Similarly, upcase capitalizes every letter and capitalize capitalizes the first letter of the string but lowercases the rest: "hello James!".upcase #=> "HELLO JAMES!" "hello James!".capitalize #=> "Hello james!" "hello James!".titleize #=> "Hello James!" If you want to modify a string in place, you can add an exclamation point to any of those methods: string = "hello James!

Converting all text to lower case in Objective-C

倖福魔咒の 提交于 2019-11-27 20:14:51
问题 I have a textfield in my iOS app where the user is supposed to input some text. But I was wondering if there is any way to convert the users input to lowercase letters. I remember in C# it was something like Convert.ToLower but I can't seem to figure out how to do it in Objective-C. 回答1: There is a method called lowercaseString on NSString . NSString contains plenty of methods for string manipulation, please read the documentation. NSString *myString = @"Hello, World!"; NSString *lower =

Does the attr() in jQuery force lowercase?

守給你的承諾、 提交于 2019-11-27 15:26:38
I'm trying to manipulate the svg 'viewBox' attribute which looks something like this: <svg viewBox="0 0 100 200" width="100" ...> ... </svg> Using $("svg").attr("viewBox","..."); However, this creates a new attribute in the element called "viewbox". Notice the lowercase instead of intended camelCase. Is there another function I should be using? I was able to use pure javascript to get the element and set the attribute by using var svg = document.getElementsByTagName("svg")[0]; and svg.setAttribute("viewBox","..."); Nick Hedberg Per http://www.w3.org/TR/xhtml1/#h-4.2 "XHTML documents must use

regex implementation to replace group with its lowercase version

╄→гoц情女王★ 提交于 2019-11-27 13:24:13
问题 Is there any implementation of regex that allow to replace group in regex with lowercase version of it? 回答1: In Perl, you can do: $string =~ s/(some_regex)/lc($1)/ge; The /e option causes the replacement expression to be interpreted as Perl code to be evaluated, whose return value is used as the final replacement value. lc($x) returns the lowercased version of $x . (Not sure but I assume lc() will handle international characters correctly in recent Perl versions.) /g means match globally.

Make first letter uppercase and the rest lowercase in a string

大憨熊 提交于 2019-11-27 11:29:09
问题 All, I'm trying to insert a last name into a database. I'd like the first letter to be capitalized for the name and if they have use two last names then capitalize the first and second names. So for example if someone enters: marriedname maidenname It would convert this to Marriedname Maidenname and so on if there is more then two names. The other scenario is is someone has an apostrophe in their name, so is there anyway to do it if someone enters: o'connell This would need to convert to O

Android ActionBar MenuItem LowerCase

隐身守侯 提交于 2019-11-27 10:28:29
问题 I want to make MenuItem title in the ActionBar to LowerCase. my menu.xml <item android:id="@+id/register" android:title="Register" android:showAsAction="ifRoom|withText"/> <item android:id="@+id/unregister" android:title="Unregister" android:showAsAction="ifRoom|withText"/> On the ActionBar it sees "REGISTER" and "UNREGISTER", but I want that it sees as "Register" and "Unregister". Is it possible to make first letter upper and next letters lower at MenuItem? And how I can do that? 回答1:

Two conditions using OR in XPATH

假如想象 提交于 2019-11-27 09:01:21
I have a textbox, 'txtSearch'. I am using it to search people by Last Name. this is my code. var xmlTempResultSearch = xmlResidentListDisplay.selectNodes( "//PeopleList/Row[contains(translate(@LastName, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '" + txtSearch.value + "')]"); This code selects all last names in the XML like the text input in the txtSearch textbox. This translates all uppercase letters to lowercase letters. So if I am searching for 'Dorosan', if I type 'doro', it retrieves the correct person because it translated the 'D' to 'd'. But when I type 'Doro', it