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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 25 Nov 2017 12:26 PM |
| This, like all your other “tutorials” are copy and pasted from ######### |
|
|
| Report Abuse |
|
|
IAmBW
|
  |
| Joined: 13 Jan 2013 |
| Total Posts: 698 |
|
|
| 25 Nov 2017 12:27 PM |
read the disclaimer in the main thread
|
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Nov 2017 12:29 PM |
| Disclaimers don’t matter when this is literal plagiarism |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 13 Jan 2013 |
| Total Posts: 698 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 13 Jan 2013 |
| Total Posts: 698 |
|
| |
|