Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Check if String is in String?
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#1
Check if String is in String?

Does angelscript for hpl2 have a way of checking if a certain string is within another string?
Fx if I wanted to check if "Bob" was in the string "BobTheBuilder"
and then if he was, do something.
03-01-2014, 01:44 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Check if String is in String?

Think this is it:
PHP Code: (Select All)
bool StringContains(stringasStringstringasSubString); 
Checks whether a string contains the specified string.
Example: searching for “hello” in “hello world” would return true.

asString - the string to check
asSubString - the string to search for

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-01-2014, 02:54 AM
Find




Users browsing this thread: 1 Guest(s)