Count function

Results 1 to 3 of 3

Thread: Count function

  1. #1
    Big Al Guest

    Default Count function

    Can I use count to read how many words are in a text field? or count how many spaces there are in the text field??

  2. #2
    Eddie Campbell Guest

    Default Easy (when you know how)

    Try This<BR>MyStr="This is some text with spaces in"<BR>MyArray=Split(MyStr,-1,1)<BR>Response.Write Ubound(MyArray)

  3. #3
    Sateesh Guest

    Default RE: Count function

    MyStr="This is a example text" <BR>Count=Split(MyStr," ",-1) <BR>Response.Write Ubound(Count) <BR>since it takes only the spaces as a delimeters it will only return 4 since there is no space before the starting word, so you can increment the count value by 1 or insert a pace before the first word to get the words count.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts