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: String Library Tutorial [GMATCH]

Previous Thread :: Next Thread 
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 11:42 AM
string.gmatch(s, pattern)

This returns a pattern finding iterator. The iterator will search through the string passed looking for instances of the pattern you passed.

Basically matches one or more characters inside the string using the arguments that you suggested in the event. The arguments work like a road, %a+ will look for the FIRST letter character and then continue until the LAST letter character, but will not JUMP to the next partial of the string.

for word in string.gmatch("Hello Lua user", "%a+") do print(word) end
Hello
Lua
user

'%a' gets a letter character and '+' will continue until the next character is not a letter (the space between the words)

For more on patterns visit:
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=227978145

Tutorial on FORMAT:
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=228021189



Report Abuse
TaaRt is online. TaaRt
Joined: 26 Apr 2009
Total Posts: 5039
25 Nov 2017 12:12 PM
"using the arguments that you suggested in the event"
What event? Suggested?

"'%a' gets a letter character "
Better 'matches any letter'

" + will continue until the next character is not a letter"
Will find the longest possible uninterrupted sequential match of foregoing character class(es), doesn't have anything to do with what to match

"(the space between the words)"
It will stop at anything that isn't a letter, not a whitespace per se

People are better of reading the Lua docs than this misinterpreted view of it. Also your attempt at terminology is horrible and teaches people wrong names
Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 12:23 PM
If you do not understand this tutorial, view the Lua wikis.


Report Abuse
greenkiller2000 is online. greenkiller2000
Joined: 27 Aug 2010
Total Posts: 76
25 Nov 2017 12:26 PM
This, like all your other “tutorials” are copy and pasted from #########
Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 12:27 PM
read the disclaimer in the main thread


Report Abuse
greenkiller2000 is online. greenkiller2000
Joined: 27 Aug 2010
Total Posts: 76
25 Nov 2017 12:27 PM
Lua users*
Report Abuse
greenkiller2000 is online. greenkiller2000
Joined: 27 Aug 2010
Total Posts: 76
25 Nov 2017 12:29 PM
Disclaimers don’t matter when this is literal plagiarism
Report Abuse
ExtremeBuilder15 is online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
25 Nov 2017 12:51 PM
What's the purpose of posting this? It's not really a tutorial, more of an explanation copied from lua users.

If it's to help you remember, then why don't you just write it down on your computer so it's easier to find?

Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 12:53 PM
I find it easier to post it on the forums, if you don't want to use this just leave XD

It wouldn't make sense for this to be copyrighted since the Lua language is free material as well as roblox has rights to use Lua


Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
25 Nov 2017 01:11 PM
IAmBW you don't have enough brain cells to use the Scripters forum please remove yourself from it.
Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 01:18 PM
lol


Report Abuse
Chrounum is not online. Chrounum
Joined: 04 Apr 2015
Total Posts: 2911
25 Nov 2017 01:29 PM
dont post on this forum again please op.


#code print("don't forget to dry the towel after use")
Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 01:31 PM
lol ok as long as you don't reply back :o


Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
25 Nov 2017 01:40 PM
thx for telling us what was on the wiki


Report Abuse
IAmBW is online. IAmBW
Joined: 13 Jan 2013
Total Posts: 698
25 Nov 2017 01:40 PM
np


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