#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0

    how to break up a string as two strings


    i need to know how i can break up a string into two strings.

    for eg:
    this is a dog --> this(1st string), Is a dog(2nd string)
    OR
    Lim kok beng --> Lim(1st string), Kok beng (2nd string)

    after that set both the string 1st char to upper case..

    pls help asap.....
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    new york
    Posts
    84
    Rep Power
    13
    check out the StringTokenizer class..
    you're going to have to write a function


    As for the conversion:

    Code:
    // example
    
    char c1;
    string1 = "this";
    c1 = string1.charAt(0);    // c1 becomes 't'
    chUpper = c1.toUpperCase();
    
    // key functions:
    // charAt();
    // toUpperCase();
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    19
    Rep Power
    0
    thanks...
    i had already solved the problem...

IMN logo majestic logo threadwatch logo seochat tools logo