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 » Scripting Helpers
Home Search
 

Re: string.find help

Previous Thread :: Next Thread 
builderman1171 is not online. builderman1171
Joined: 27 Mar 2010
Total Posts: 1595
09 Jan 2013 06:39 PM
So, I'm searching through a string for a word, "Hello", for example. I want to find both places that the string is located, the beginning, and the end. I can get the beginning, but how can I get the end place? String.find return a number like so "beginning_number end_number", but how can I get the end number?
Report Abuse
angelinafm is not online. angelinafm
Joined: 10 Apr 2011
Total Posts: 134
09 Jan 2013 06:41 PM
If you mean what I think you mean, you could just do this:

beginning_number + #string

That's my guess. Not sure if I understood you though.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
09 Jan 2013 06:46 PM
You can use -1 to represent the end, and -2 to mean the one just before the end, and so on.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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