Results 1 to 3 of 3

Thread: Character Counting in a String?

  1. #1
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Character Counting in a String?

    How do I count the Characters in a String? (with SCAR)
    Edit:Oh yeah, I already know I could do something like
    SCAR Code:
    repeat
      if AString = '' then break;
      AString:=AString+(DeleteByte);
      AnInt:=AnInt+1;
    until SomeDumbThingHappens;
    And I also want to know how I can find out what the specific characters are in the string.
    Active only during the Summer...

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    To count the characters, use the Length() function. To get a specific character in a string, treat it like an array. For example, MyString[5]. Just remember that it starts at 1, not 0.

  3. #3
    Join Date
    Jun 2007
    Posts
    1,312
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    To count the characters, use the Length() function. To get a specific character in a string, treat it like an array. For example, MyString[5]. Just remember that it starts at 1, not 0.
    Thanks
    Active only during the Summer...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Finding a certain character in a string,
    By Sandstorm in forum OSR Help
    Replies: 1
    Last Post: 10-31-2008, 07:43 PM
  2. Replies: 5
    Last Post: 03-30-2008, 01:40 PM

Posting Permissions

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