generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Finding Text in a String

Previous Thread :: Next Thread 
Lineout is not online. 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 is not online. 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 is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
08 Dec 2015 05:49 PM
no

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
Metology is not online. Metology
Joined: 06 Oct 2014
Total Posts: 3255
08 Dec 2015 05:51 PM
o mb i said a theory
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 05:51 PM
string:match("wheel")
Report Abuse
Metology is not online. Metology
Joined: 06 Oct 2014
Total Posts: 3255
08 Dec 2015 06:00 PM
its string.match
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 06:01 PM
string = "asdfsdfwheelasdfas"


string:match("wheel")

string.gmatch(String,"wheel")

either way
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
08 Dec 2015 06:14 PM
this is inefficient but I think string.find(String, "(wheel)")looks better
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 06:21 PM
Stop trying to make your god damn scripts look pretty.
Report Abuse
GooeyChopsticks is not online. GooeyChopsticks
Joined: 25 Nov 2015
Total Posts: 632
08 Dec 2015 07:30 PM
I will do what I want; I care about readable code.
Report Abuse
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 07:34 PM
Moron
Report Abuse
cgjnm is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image