case-insensitive

So functions/methods in PHP are case insensitive?

function ag() { echo '2'; } Ag(); class test { function clMe() { echo 'hi'; } } $instance = new test; $instance->clme(); But that's the not case with variables, what's the rationale in it? ...

case insensitive highlighting in php

i'm using this function to highlight the results from mysql query: function highlightWords($string, $word) { $string = str_replace($word, "<span class='highlight'>".$word."</span>", $string); /*** return the highlighted string ***/ return $string; } .... $cQuote = highlightWords(htmlspecialchars($row['cQuotes'...

How to make Oracle case insensitive

Is there be a setting in Oracle 10g to consider data as case insensitive? I saw a solution here. However, that is done on a session. What I am looking for is a setting either on a schema or on a table to consider its data as case insensitive. If it is on a session then I will have to make the change on all the stored procedures. ...

Perform case-insensitive lookup on an Array in MongoDB?

So, I've decided to get my feet wet with MongoDB and love it so far. It seems very fast and flexible which is great. But, I'm still going through the initial learning curve and as such, I'm spending hours digging for info on the most basic things. I've search throughout the MongoDB online documentation and have spent hours Googling th...

PHP making input from web form case insensitive?

So I have some code here that takes user input from a standard web form: if (get_magic_quotes_gpc()) { $searchsport = stripslashes($_POST['sport']); $sportarray = array( "Football" => "Fb01", "Cricket" => "ck32", "Tennis" => "Tn43", ); if(isset($sportarray[$searchsport])){ header("Location: ".$sportarray[$searchsport].".html"); die; } ...

strnicmp equivalent for UTF-8?

What do I use to perform a case-insensitive comparison on two UTF-8 encoded sub-strings? Essentially, I'm looking for a strnicmp function for UTF-8. ...

Zend_Controller_Router_Route_Regex is case insensitive

For those wondering why Zend_Controller_Router_Route_Regex matches case-different routes, eg. hxxp://example.com/EN vs. hxxp://example.com/en, here's an explanation. Zend_Controller_Router_Route_Regex is implicitly case insensitive. It is set in Zend_Controller_Router_Route_Regex::match() method. This is the piece of code that sets PCR...

How to do case-insensitive order in Rails with postgresql

I am in the process of switching my development environment from sqlite3 to postgresql 8.4 and have one last hurdle. In my original I had the following line in a helper method; result = Users.find(:all, :order => "name collate NOCASE") which provided a very nice case-insensitive search. I can't replicate this for postgresql. Should b...

How to checkout a case sensitive SVN source code branch to a case insensitive system?

I am working on a Macbook system , which is formatted as a case insensitive system. The issue is that, I need to check out a SVN branch which has some case sensitive files in it. Example: inbuilt-file.c InBuilt-File.c How do I checkout this branch when both the files are in the same folder? When I try and checkout, it gives me an err...

ArrayList & contains() - case insensitive

Hi! I want the contains() method from ArrayList to be case insensitive. Is there any way? Thanks ...

How to use case insensitive pattern matching with PostgreSQL and Umlauts?

I'm trying to get PostgreSQL 8.4.3 to do case insensitive pattern matching with its ~* operator when the strings contain non-ASCII characters like German umlauts. The database, terminal, and everything else is configured to use UTF-8. Here's the problem in a nutshell: SELECT 'Ö' ~* 'ö'; -- false There are other variants which do...

Case sensitive and insensitive in the same pattern

hi guys, thanks to the help with my previous homework question Regex to match tags like <A>, <BB>, <CCC> but not <ABC>, but now i have another homework question. i need to match tags like <LOL>, <LOLOLOL> (3 uppercase letters, with repeatable last two letters), but not <lol> (need to be uppercase). using the technique from the previou...

C# Comparing strings with different case

I'm reading a username and then checking to see if exists in another database table, the problem is whilst the username is the same the case maybe different and is preventing it from finding a match example jsmith and JSmith or JSMITH. How can I fix this? Should I lower the case when writing to the first database or can I alter my code ...

C# Case insensitive string compare

Hi all, How can I make the line below case insensitive? drUser["Enrolled"] = (enrolledUsers.FindIndex(x => x.Username == (string)drUser["Username"]) != -1); I was given some advice earlier today that suggested I use: x.Username.Equals((string)drUser["Username"], StringComparison.OrdinalIgnoreCase))); the trouble is I can't get th...

Case insensitive std::string.find()

I am using std::string's find() method to test if a string is a substring of another. Now I need case insensitive version of the same thing. For string comparison I can always turn to stricmp() but there doesn't seem to be a stristr(). I have found various answers and most suggest using Boost which is not an option in my case. Addition...

[iPhone app] Detecting string starting with expression and case-insensitive

Hello ! In my iPhone app I'm actually detecting text/html content type before showing data in an UIWebView or UITextView. I detect this with a ContentType variable starting with "text/html", full variable looks like "text/html; charset=utf-8". So for the moment I use this : if (myContentType hasPrefix:@"text/html") This is fine, bu...

What is the purpose of case sensitivity in languages?

Possible Duplicates: Is there any advantage of being a case-sensitive programming language? Why are many languages case sensitive? Something I have always wondered, is why are languages designed to be case sensitive? My pea brain can't fathom any possible reason why it is helpful. But I'm sure there is one out there. And ...

git status reports modified files in a freshly cloned repo

Solved It seems the remote repo contains two files named the same, except for the first letter. This caused a file overwrite on my system, which led to the issue below. Update It seems it has nothing to do with newlines, but I can't yet find an explanation. Here's what happens. git status reports FileStartingWithCapitalLetter.php has...

How do I remove case sensitivity from an entire Rails app?

I have a fairly complex Rails app built on top of Twitter's API, and want to make the whole app case-insensitive. Up until now, we've been converting all usernames and other strings to .downcase whenever possible and using the default case-sensitive searches, but that's starting to cause problems, with 'Username' and 'username' being c...

In bash, can the file operator (-f) be case-insensitive?

I'm doing the following: if [ -f $FILE ] ; then echo "File exists" fi But I want the -f to be case-insensitive. That is, if FILE is /etc/somefile, I want -f to recognize /Etc/SomeFile. I can partially work around it with glob: shopt -s nocaseglob TARG='/etc/somefile' MATCH=$TARG* #assume it returns only one match if [[ -f...