conversion
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tan_Jaslyn
Posted On:   Wednesday, June 19, 2002 12:16 AM

Hi, may i know how do i convert a char to a String
and also how to convert part of the String to upper case?

Re: conversion

Posted By:   Thomas_Hackel  
Posted On:   Wednesday, June 19, 2002 01:00 AM


char ch='f';

String bla=""+ch;



but for perfomance you should ever use StringBuffer instead of String.


char ch='u';

StringBuffer sb=new StringBuffer();

sb.append(ch);


I think its not possible to convert only some letters of a String to uppercase. You have to get the substring, convert it to upper case and the concatinate it with the parts of the original string.
About | Sitemap | Contact