Lineout
|
  |
| Joined: 06 Nov 2012 |
| Total Posts: 684 |
|
|
| 08 Dec 2015 05:47 PM |
Example:
string = "asdfsdfwheelasdfas"
How would I detect if that string has the word "wheel" in it? |
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 08 Dec 2015 05:49 PM |
string = 'asdfsdfwheelasdfas' if string.Text 'wheel' then
print('wsfiedf')
just a theory. cant check it it |
|
|
| Report Abuse |
|
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 08 Dec 2015 05:49 PM |
no
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
| |
|
| |
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
| |
|
|
| 08 Dec 2015 06:01 PM |
string = "asdfsdfwheelasdfas"
string:match("wheel")
string.gmatch(String,"wheel")
either way |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 06:14 PM |
| this is inefficient but I think string.find(String, "(wheel)")looks better |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 06:21 PM |
| Stop trying to make your god damn scripts look pretty. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 07:30 PM |
| I will do what I want; I care about readable code. |
|
|
| Report Abuse |
|
|
| |
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 08 Dec 2015 07:35 PM |
Or you know....
local String1 = 'BlaBlahWheelBlahBlah' if String1:find('Wheel') then
end |
|
|
| Report Abuse |
|
|