answersLogoWhite

0


Best Answer

You can use the methods toUpperCase & toLowerCase to convert Strings to any case you want.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Convertion of upper case char in a string to lower case and vice versa?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program convert a string from uppercase to lower case and vice-versa without using string tolower and string toupper commands in TCL?

[ string toupper $str ] or [ string tolower $str ]


C programming to convert upper case string into lower case string and vice versa without using builtin function?

#include<stdio.h> #include<conio.h> void main() { char ch; clrscr(); printf("Enter a Character"); scanf("%c",&ch); if(ch>=65 && ch<=90) ch=ch+32; printf("Upper Case =%c",ch); getch(); }


Can you increase amps without having an increase in volts?

In general, increased resistance will lower current draw. See ohm's law (V = IR)


What is the element law of a capacitor in frequency domain?

The element law of a capacitor in frequency domain is based on Ohm's Law, which is capacitance times voltage is equal to current. The higher frequency, the lower the capacitance and vice versa.


How does a 'string' type string differ from a c-type string?

A char is a single character. A String is a collection of characters. It may be empty (zero characters), have one character, two character, or many characters - even a fairly long text.The single quote (') is used to deliniate a character during assignment:char someChar = 'a';The double quote (") is used to delineate a string during assignment:String someString = new String("hello there");Note that char is a primitive data type in Java, while String is an Object. You CANNOT directly assign a char to a String (or vice versa). There is, however, a Character object that wraps the char primitive type, and Java allows method calls to be made on the char primitive (automagically converting the char to Character before doing so).i.e. these ALL FAIL:someString = SomeChar;someString = new String(someChar);However, these WILL work:someString = Character.toString(someChar);someString = someChar.toString();Also note that a String is a static memory allocation, while a character's is dynamic. By that, I mean that when a String is created, it is allocated a memory location exactly big enough to fit the assigned string. Any change to that String forces and entirely new memory location to be allocated, the contents of the old String copied in (with the appropriate changes), and the old String object subject to garbage collection. Thus, making changes to a String object are quite inefficient (if you want that kind of behaviour, use StringBuffer instead).A character is allocated but once; all subsequent changes to a character variable simply overwrite that same memory location, so frequent changes to a character variable incur no real penalty.

Related questions

Write a program convert a string from uppercase to lower case and vice-versa without using string tolower and string toupper commands in TCL?

[ string toupper $str ] or [ string tolower $str ]


Write a C program to convert an upper case word to lower case and vice-versa.?

You would use the ToUpper and ToLower functions. string name = "XVengeance"; string upperName = name.ToUpper(); string lowerName = name.ToLower(); Console.WriteLine(upperName); Console.WriteLine(lowerName); Console.ReadLine(); I don't think I'm supposed to do your homework for you, but this code should get you started on making a more dynamic program.


How can you lower the pitch of a note on a quitar by altering then tension of the string?

The pitch is determined by by the frequency in which the string is swinging, which, in turn, is determined by the speed with which a wave can travel through the string. The higher the tension in the string is, the easier it is for a wave to travel through it, and if the speed of the wave increase, so will the frequency, and by default the pitch of the note. And vice versa. If I remember my physics correctly :)


What color was the crown in Ancient Egypt?

The crown of upper Egypt was white, and the one for lower Egypt was red. Those were united in one piece.


What does the musical term inversion mean?

1. the process or result of transposing the tones of an interval or chord so that the original bass becomes an upper voice. 2. (in counterpoint) the transposition of the upper voice part below the lower, and vice versa. 3. presentation of a melody in contrary motion to its original form.


Write a program that converts a string from small letters to capital letters and vice versa?

Here's a Python program that accomplishes this: def convert_case(input_str): return input_str.swapcase() user_input = input("Enter a string: ") converted_str = convert_case(user_input) print("Converted string:", converted_str)


What is metacarpals metatarsals tarsals and carpals?

These are bones in the human body. Metacarpals are bones in the hand, while metatarsals are bones in the foot. Carpals are bones in the wrist, and tarsals are bones in the ankle.


How do you test string tension of a tennis racket?

For ease, you can purchase a string meter or any other string tension meter that measures it for you. All you need to do is clip it between the strings and it will read the number in the display. If not, you can always use your hand and lightly tap the string bed to get an rough est. The harder it is the higher the tension and vice versa.


Why are the strings in a guitar of varying thickness?

The thickness of a guitar string affects the pitch produced by it. The thicker a string is, the deeper the tone. However, the reason that the pitch becomes higher when a fret is pressed down on the string is because the metal of the fret is stopping all vibrations beyond that fret, thus making the string "shorter." You might be talking about the gauge of a string. Strings have different gauges to better fit the preferences of the guitarist. The higher the gauge, the harder it is to break that string. However, a higher gauge makes the string harder to play and may hurt the fingers of newer guitarists.


How do electric bass strings compare to upright bass strings?

Well, for one, string bass strings are a lot longer than electric bass strings. I wouldn't recommend putting string bass strings on an electric bass and vice versa.


Do adjustable struts raise or lower ride height?

You can do both on some. And then others are up only and vise-versa.


Whats the difference between character and string if only one character is there?

Nothing Most computer languages have a string-termination character that is "invisible" to people. So, while a character variable may contain 'A', and a string variable appears to be simply "A", the string variable will actually have two characters. This difference is often masked by compilers and languages, but it exists nonetheless, and it is sloppy programming practice to compare a string to a character (or vice versa) without doing a type cast.