data filtering

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harsh Aggarwal
    New Member
    • Aug 2008
    • 2

    data filtering

    if we are having data in atext box
    let it is
    harsh kumar aggarwal



    then we have to print in three different text boxes as
    Harsh
    K.
    Aggarwal

    note that in every text box the text starts with a capital letter.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    What have you done so far?

    Comment

    • cloud255
      Recognized Expert Contributor
      • Jun 2008
      • 427

      #3
      Well getting a character capatalized is really not an issue, the bigger problem is the format of your input text box. will the user ALWAYS enter text in that format i.e. a string with 3 spaces or does the format change?

      to get a the first character in caps just go:

      Code:
      string s = textbox.text;
      s[0] = s[0].toString().toUpper();
      the problem is getting each word to start with a caps, what you could do is create a function which searches for the index of each "space" in the string. the funciton can then return an array containing all the indexes( sorry for the spelling/grammer) then apply the above code to each index+1.

      good luck

      Comment

      Working...