Results 1 to 6 of 6

Thread: Looking for text in string?

  1. #1
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Looking for text in string?

    Hi everyone,

    I can't find this anywhere in the SCAR manual or in the WIKI, so i ask it here:

    Is there some kind of function that looks for text in a string?
    Like, for example, i have the string 'I like cookies', and i want to check if there is 'like' in it.
    Ofcourse we all know it is, but i want to make it clear.
    And, if not, is there some way to do it anyway?

  2. #2
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    if Pos('like','I like cookies') > 0 then Result := True;

    It returns the positions of a substr in a str.. If its not in the string it returns 0. And it is case sensitive.

    ~Raymond
    Verrekte Koekwous

  3. #3
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  4. #4
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its in the scar manual
    The truth finally came out...


  5. #5
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mat_de_b View Post
    Its in the scar manual
    and in my head ^^.
    Verrekte Koekwous

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

    Default

    masta isn't the scar manual? JEEZ! Learn something new every day...
    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. Need help getting a string between text.
    By Shady? in forum OSR Help
    Replies: 11
    Last Post: 11-08-2008, 01:35 AM
  2. function SendKeyboard(FKey:Integer; Text:String): Integer;
    By Daniel in forum Research & Development Lounge
    Replies: 4
    Last Post: 07-18-2007, 04:28 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
  •