The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Java string manipulation.. by MrTrick2007-03-04 16:23:05
  stringname.split("."); by dodrian2007-03-04 16:31:24
    Yes, it is... "\\." escapes it. by MrTrick2007-03-04 16:37:56
      I like the C method of doing this. by fudje 2007-03-04 23:03:54

Two options.

*str |= 0x20;  /*makes less sense to the casual observer*/
str[0] |= 0x20; /*quicker execution.  Well, was until compilers started treating array[index] exactly like *(array + index);

This, of course, assumes that you're dealing with latin letters, and may produce interesting results if you're not (works for iso8859-1 accented characters, and appropriate unicode wide characters provided you do you conversion to the pair, which is tricky to retrieve. UTF-8 is in the wrong order...).
You could also use ucfirst. It's beyond me why Java doesn't have this function.

[ Reply ]
        MODS! by ToLazyToThink2007-03-04 23:35:07

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)