Hi again, please help! :)
Hi guys...i posted this problem a while ago, (a week!) and u told me to use the method replaceALL('a','')... but i dont have Java 1.4. I figured out anyway, i just used substrings...rofl :)
But: Is there a shorter way? i am running Ready to program...v 1.0.0.9
Have fun
I need help, this is a question i just cant seem to decifer.
A simple way of shortening words is to remove all vowels (Like in tel. directories).
I must write a programm that will take as input a string (of up tp 255 chars) and pritn out the same string with the vowels removed. Vowels are a,e,i,o,u. I must remove lower and Upper case vowels. without changing case of reamining string. I am not allowed to change the sapcing or punctuation.
""
Here's a small example...
public class RemoveVowels
public static final String stripVowels(String src) {
return RemoveVowels
.stripVowels(src, new StringBuffer(src.length())).toString();
public static final StringBuffer stripVowels(String src, StringBuffer buf) {
char[] ch = src.toCharArray(); // Faster then calling charAt(...) multiple times
for (int i = 0; i < ch.length; i++) {
switch (ch) {
case 'A': case 'a':
case 'E': case 'e':
case 'I': case 'i':
case 'O': case 'o':
case 'U': case 'u':
break;
default:
buf.append(ch[i]);
return buf;
public static void main(String[] args) {
for (int i = 0; i < args.length; i++) {
System.out.println(args[i]);
System.out.print(" => ");
System.out.println(RemoveVowels.stripVowels(args[i]));
The command 'java RemoveVowels "This is a test, can I remove vowels?"' gave the following output:
This is a test, can I remove vowels?
=> Ths s tst, cn rmv vwls?It's quite fast too...
Regards,
/Håkan
Similar Messages
-
The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home on my wi Fi is the only time it works correct. Bill. [email protected] 708 752 3667
http://lifehacker.com/5852948/what-to-do-if-youve-forgotten-your-iphones-passcod e
-
i am not able to sign into i message, it keeps giving me a message "could not sign in. Please check your network connection and try again" Please help!!
FaceTime, Game Center, Messages: Troubleshooting sign in issues
-
After cleaning my mac it opens and shuts down again please help!!!
after cleaning my mac it opens and shuts down again please help!!!
I opened the cover (there where the battery is) and I cleaned the dust gently with a dry napkin ...remove the battery and placed it again ...closed the cover and when i turn on my macbook bro now it shows the Apple logo and after some seconds it just shuts down (i have OSX 10.9 Mavericks)....
I tried to boot in safe mode, also tried to repair it and even re-install Mavericks and so on, but I could not fix it. I did a hardware test and the no problems occurred. -
when i turn on my iphone 5s gold,it keeps on showing the apple logo then turns off. i have put it in recovery mode twice. it will work a week or two then back again. please help! thanks you
hi
... i have a similar problem
but just with the sleep botton.
fist use your adapter with other iphone/itouch ... is posible itś the problem
second .. let your phone charging
...normally if we conect our phone ... after some minuts it's put on.
after 2 hours ... trate to use it ... if after it your phone continue same... could be qaa electrical/physic problem
please if you have a guaranty use it.
im sorry but my english is terrible. -
I am using iPhone 4 (MC603B, version 4.3(8F190) and never updated it. as i have formatted my laptop; i have to download iTunes again. please help me to download iTunes which suits this version. where can i get the link. thank you.
Older iTunes versions can be downloaded here: Apple - Support - Downloads
Follow these steps to get your data to your new computer:
Syncing to a "New" Computer or replacin… -
my ipod keeps asking me to restore and when i do restore it just restarts and asks me to connect to itunes and starts again.please help its my sons bday and this is his present
Maybe:
Restore loop (being prompted to restore again after a restore successfully completes)
Troubleshoot your USB connection. If the issue persists, out-of-date or incorrectly configured third-party security software may be causing this issue. Please follow Troubleshooting security software issues. .
Next try placing in DFU mode and then restoring.
How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
Then try restoring on another computer.
Last, make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
I intended to install windows on my macbook, but I removed Mac os X wrongly! Now I don't know how to install Mac again please help me.
I still don't know which version of OSX you have but assuming it's 10.7 or 10.8 .....
You need to press command-R (at the sound of the chime) to get into recovery, try that, if it does not work try command-option-R for Internet Recovery. -
when activating facetime, it says...could not sign in. please check your network connection and try again. never tried facetime with my account. i tried to register with other apple ID but it does not help. please help.
a lot of us are in the same boat - no help from anyone as of yet
-
my macbook worked fine till yesterday but today it doesnt seem to connect to the wi-fi on its on ... i have to turn the airport off and on again till it connects . my internet is fine cos my iphone seems to catch the signals just fine ... please help ?
Hey there shriya bhardwaj!
I have an article for you that will help you troubleshoot this Wi-Fi issue on your computer:
Wi-Fi: How to troubleshoot Wi-Fi connectivity
http://support.apple.com/kb/HT4628
Thanks for using the Apple Support Communities. Have a good one!
-Braden -
How can I make my ipad work again please help
Hi I bought my iPad last year and it's been working fine. Today I was just going through the settings and it said there was a software update for IOS7 so I agreed to have it done, but I had no idea it was going to take so long (would be nice if they gave a heads up). I had to use my ipad for timely purposes so after a couple of minutes and what looked like only 2% complete, I tried to stop it and the only way was to turn off the device (no option to pause or stop!).
Now when I turned it back on it says I have to sync it to iTunes and won't go to any other screen. I synced it to iTunes (first time since I purchased it and my Cloud's memory has been full for months so I have no backup whatsoever of anything on my ipad - pictures, email etc. When I sync it up to iTunes it says that it detects a systems update in progress and I cannot continue until it is completed, would i like to continue. I thought I guess that's my only option so I said ok, but unlike when I did it wirelessly unsynced to iTunes earlier, now it is giving a warning that it will return my iPad to factory settings and erase anything I have on it when it completes installing the software!! No thank you!!!! Wish I had that warning the first time around, I have a year's worth of information stored on there that I do not want deleted.
Somebody please help, how can I get my iPad back to how it was before and stop this update nonsense ASAP??? What a way to ruin my Sunday Please help anybody who can.... Thank you. (and I don't see an option to back it up it just goes to the page to update the device in order to do anything else). Surely there must be a way!! Anybody??From your description it seems that you have to upgrade to iOS 7 now.
No one can say what state your iPad is in since you interrupted a very critical process!
It is perfectly normal that your iPad's contents are erased during the upgrade process.
All your data will be restored afterwards, if, and only if you have a recent backup of your iPad!
To restore your backup from iCloud follow these instructions:
http://support.apple.com/kb/PH12521 -
how to determine the source to where my saved photo (not taken by my iPhone camera) on whether what application or website did i got that photo? need to go to the source again, please help
There is no way to trace the source of a saved photo.
You might have some luck if you search through the Safari web site history available via the Bookmark icon. -
Title explains it all, please help
My bill is paid I noticed this when I couldnt make calls.
When I clicked the call button it did nothing.Hi ikgodb,
If you are having an issue with being unable to make phone calls, I would suggest that you troubleshoot using the steps in this article -
iPhone: Troubleshooting issues making or receiving calls - Apple Support
Thanks for using Apple Support Communities.
Best,
Brett L -
I cant set up my facetime in a new iPod touch 5 generation, I enter my apple id and password and select my email address and it get verification but after that it come back to enter my apple id and password again. please help
This is the iPhone forum
-
I had to restart my mac desktop because it froze now I went to restart it and all its doing is beeping at me. Does any one know how to get it to start again Please help
Welcome to the Apple Support Communities
It shows a hardware issue. How many beeps do you hear? See > http://support.apple.com/kb/HT2538 -
Using app hbogo on ipad2 I keep getting"there was a problem starting this video.please try again"message all the time,need help.
Has this always occurred with the app or did it just start?
Which content provider are you using?
Maybe you are looking for
-
Vertical scroll bar for the table
Hi, I have a table which will contain more than 100 rows. First Visible rows will be 10. i want a vertical scroll bar for the table, so that i can see all the rows using vertical scroll bar. While scrolling down, the header row, which contain names o
-
What are the best Earbud Headphones for $50 or Le
Hey i was wondering what the best earbud headphones were for less than $50 shipped. I want a design like EP-630 Or the CX-300 's. But what are the BEST for my price range? CX's look good but are there anything better? Thanks,Matt
-
How to use own or other creditcard in Family Share?
Hello together, i'm using the Family Sharing functionality(for example my dad set up the Family Share), great ideal. But now i want to buy an App on my own and do not want to use the Family-Creditcard but my own creditcard (sometimes i want to pay on
-
Can't create a leave request via ptarq
hi all, i can't create neither approve any request via ptarq ? anyhelp would be appreciated .
-
Hi How can I customize ORA error messages? For example I have a master-detail page generated with JHeadstart 10.1.2. When I delete a master with details I get this error message: ORA-02292: integrity constraint (APL.PWL_PWJ_FK) violated - child recor