FAQ Database Discussion Community


Why isn't the first character uppercase?

java,string,char,uppercase,lowercase
I have found syntax that is supposed to change the first character from a lowercase letter to an uppercase letter. For some reason my program won't! When I type a 'm' instead of 'M'. What am I doing wrong here? public static void main(String[] args) { System.out.print("Enter two characters: ");...

How to convert uppercase letter to lowercase?

android,android-edittext,uppercase
I am creating one application,in my login page i am able to enter uppercase and lowercase letters both,what i want is if user enters letters in uppercase it should convert to lowercase,in short i dont want to allow user to enter uppercase letters <EditText android:id="@+id/email" android:layout_width="match_parent" android:layout_height="60dp" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:background="@drawable/f_name"...

PHP ucwords/ucfirst error on echo but works on var_dump

php,string,codeigniter,uppercase
Im using Codeigniter, Please take a look below: <?php $class = $this->router->fetch_class(); $method = $this->router->fetch_method(); var_dump($class); var_dump(ucwords($class)); var_dump(ucwords(strtolower($class))); ?> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <!-- this one is not working --> <li><a href="<?php echo site_url($class) ?>"><?php echo $page_alias ? $page_alias : ucwords(strtolower($class))...

Convert java char inside string to lowerCase/upperCase

java,string,character,uppercase,lowercase
I have a String called "originalstring" which contains a sentence with mixed upper and lower case characters. I simply want to flip the string so that if a character is a lowercase make it upper case and vice versa and return it. I have tried this code, which returns the...

Determining index of last uppercase letter in column value (SQL)?

sql-server,string,uppercase
Short version: Is there a way to easily extract and ORDER BY a substring of values in a DB column based on the index (position) of the last upper case letter in that value, only using SQL? Long version: I have a table with a username field, and the convention...

How do I make text-transform:uppercase work properly with Greek?

uppercase,lang,css
The issue I came across has to do with the capitalization of Greek characters by the text-transform: uppercase property. In Greek, vowels can have acute accents, both small and caps, for instance one in Greek is ένα. In the beginning of a sentence would be Ένα. But when a word...

How to find if exist an uppercase character in string?

string,axapta,x++,dynamics-ax-2012,uppercase
I need to know if a string is at least one character or more. I need to find the uppercase character . I used this code: str testStr; int flag; testStr = "abdE2" ; flag = strScan(testStr , "ABCDEFGHILMNOPQRSTUVZ" ,flag ,strLen(testStr)); info(strFmt("%1",flag) ); But not work! A problem is that...

Set UIControl's font to uppercase [duplicate]

string,cocoa,cocoa-touch,nsstring,uppercase
This question already has an answer here: Capitalize or change case of an NSString in Objective-C 2 answers How do I set this to be uppercase? - (void)drawSegmentedControl { HMSegmentedControl *segmentedControl = [[HMSegmentedControl alloc] initWithSectionTitles:@[@"First", @"Second", @"Third"]]; segmentedControl.font = [UIFont fontWithName:@"Helvetica Neue" size:16]; } ...

Javascript - How to join two capitalize first letter of word scripts

javascript,acrobat,uppercase
I have an Acrobat form with some text fields with multiline on. My goal is to convert to uppercase the first letter of any sentence (look for dots) and also the first letter of any new line (after return has been pressed). I can run each transformation separately, but do...

Python get file regardless of upper or lower

python,python-2.7,glob,uppercase,lowercase
I'm trying to use this on my program to get an mp3 file regardless of case, and I've this code: import glob import fnmatch, re def custom_song(name): for song in re.compile(fnmatch.translate(glob.glob("../music/*"+name+"*.mp3")), re.IGNORECASE): print (song) custom_song("hello") But when I execute the script i get the following error: File "music.py", line 4,...

How to change letters in a string in python

python,string,uppercase
I am trying to change the first character in a string to be uppercase. I approached it like this: word = "dalmatian" word[0] = word[0].upper() print word However I produce this error Traceback (most recent call last): File "/Users/Tom/Documents/coolone.py", line 3, in <module> word[0] = word[0].upper() TypeError: 'str' object does...

How to compare the DialogField value between a string with a difference uppercase?

dialog,axapta,x++,dynamics-ax-2012,uppercase
I have this little question, how I can compare the dialogField.Value() with my String, I need to have a difference between uppercase . I used this code, but I haven't strictness, I have the true return in both case , upper and lower case. dialogField = dialog.addFieldValue(extendedTypeStr(String30), text); if (dialogField.value()...

Conversion of a specific character in a string to Upper Case

python,string,uppercase
How can I convert a specific letter in a string, i.e all the the as in 'ahdhkhkahfkahafafkh' to uppercase? I can only seem to find ways to capitalize the first word or upper/lower case the entire string. ...

if/else statements accepting strings in both capital and lower-case letters in python

python,if-statement,uppercase,lowercase,capitalize
Is there a quick way for an "if" statement to accept a string regardless of whether it's lower-case, upper-case or both in python? I'm attempting to write a piece of code where the number "3" can be entered as well as the word "three"or "Three" or any other mixture of...

How to load an uppercase alphabet?

python,uppercase,alphabet,caesar-cipher
I have been trying to create a Caesar cipher program. To make it as inclusive as possible I want to be able to use upper case letters as well. I know how to load a lower case alphabet: alphabet = string.ascii_lowercase * 2 (I have timed it by two to...

Capitalize the first letter of string in AngularJs

javascript,angularjs,filter,uppercase,capitalize
I want capitalize first character of string in angularjs As i used {{ uppercase_expression | uppercase}} it convert whole string to upper case....

MySQL: Change case for compound names

mysql,uppercase
I have a dataset where names are in all uppercase, and need to convert them to proper case for reports. I found here in Stackoverflow the following code: SET LastName = CONCAT(UPPER(SUBSTRING(LastName, 1, 1)),LOWER(SUBSTRING(LastName, 2))); This works great for simple last names: SMITH --> Smith JONES --> Jones But not...

Code not working - upper and lower - Python [duplicate]

python,uppercase,lowercase
This question already has an answer here: Why doesn't calling a Python string method do anything unless you assign its output? 2 answers The below is my code, and as you can guess, I am trying to change the input's first to upper, and rest to lower. name =...

I get this error: Cannot call method 'replace' of undefined at String.toJadenCase

javascript,regex,string,uppercase
String.prototype.toJadenCase = function (str) { //... var capitalize = str; return capitalize.replace(/^[a-zA-Z]*$/, function(txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); } When I pass the string "How can mirrors be real if our eyes aren't real" as a parameter I get the error. It should return each word capitalized like: "How Can Mirrors...

How to check the right login data in access form

vba,login,access-vba,uppercase,lowercase
I've created a nice login form in access. The problem is that I can login altough I use upper- or lowercase for the username or password... How can I check the right login data which are in the table? I use this code at the moment: If Nz(DLookup("Login", "Employee", _...

PHP uppercase letter in String

php,uppercase
Like the title says, I'm looking for a way to check if a string contains an uppercase letter in it. It is for a password field, and I cannot use regex because we have not learned any of that yet in class. I tried to use ctype_upper but that only...

Delete Words w/Upper And Lowercase Letters or Only Lowercase Letters

sql,ms-access,delete,uppercase,lowercase
Objective: I have an Access table with a column Item_Desc. I want this column to only contain the brand names of clothing. The brand names are always written in ALL CAPS, e.g., "RALPH LAUREN". Problem: The Item_Desc column is populated with both brand names and type of article of clothing...

Change lowercase and uppercase of characters in java

java,unicode,mapping,uppercase,lowercase
If I want to create a dictionary where the user can create a custom alphabet (that still uses unicode) Is there a way to change lowercase and uppercase mapping of the characters? Let's say I want the lowercase of 'I' to be 'ı' instead of 'i' or upperCase of 'b'...

How can I convert a csv file to lowercase or uppercase maintaining it's structure using powershell?

powershell,csv,uppercase,lowercase
I have a CSV file that with contents that needs to be converted to all lowercase I have tried the code below but it doesn't maintain the CSV structure. (Get-Content C:\_Scratch\export.csv).ToLower() | Out-File C:\_scratch\export.csv $Init = Import-Csv C:\_Scratch\export.csv Is there another option I can try?...

How to find words(strings) with only Uppercase letters?

java,string,uppercase
I was wondering, is there any function or way, how to select from a random text all words(strings) with only uppercase letters? To be more specific, I want to take from text all uppercase words and put them into an string array, because those uppercase words are important for me....

Echo array data turns all text into lowercase

php,mysql,sql,uppercase
I am having some problems fetching the array from my database properly. All my text is being echoed in lowercase. While the text in the database is both lower & uppercase. How can make it fetch properly? This is my actual SQL request: $page = (int) (!isset($_GET['p'])) ? 1 :...

Can I use javascript to uppercase the first letter from the prompt input

javascript,uppercase
I was wondering a way of upper-casing the first letter, my code is: var userChoice = prompt("Do you choose rock, paper or scissors?"); if (userChoice !== "Rock" || userChoice !== "Paper" || userChoice !== "Scissors") { throw new Error("Incorrect choice."); }; I want it so that regardless if the user...

Count uppercase characters in a word

linux,string,shell,uppercase
I need to count how many uppercase letters there are in a word. How can I do this?

VBA Excel: Prevent Excel to change data as date after changing all cells to uppercase

excel-vba,date,uppercase
I have the following code to capitalize all data in two specified ranges and then run some comparing code. The issue is once it runs the capitalize code cells that contain something like 1-2 gets changed to 2-Jan. I cannot apply .NumberFormat = "@" to the entire worksheet or that...

pointer sentence case (C)

c,pointers,uppercase,lowercase,sentencecase
I have problem to output text in sentence case characters. When I prompt: heLLo! heLLo. i am OKAY. I'm expecting output: Hello! Hello. I am okay. But my sample run output is: Hello! hello. i am okay. My code cannot output uppercase after '!'/'.'/'?'/'_' Anybody can advise what mistake that...