DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 20 May 2016 06:02 PM |
How would I go about making it remove spaces between words and only allowing one space?
text = 'HELLO HI'
So people can't spam it down to other lines on a chat gui so that will be:
text = 'HELLO HI'
I'm not the best with string manipulation but I don't know enough at this present time as how to do this.
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 20 May 2016 06:04 PM |
Would I just get each word then add in my own spaces?
|
|
|
| Report Abuse |
|
|
|
| 20 May 2016 06:04 PM |
text = [[Mind = Blown]]
Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 20 May 2016 06:05 PM |
for i=1, StringHere:len() do string.gsub(StringHere,' ',' ') end |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 May 2016 06:09 PM |
text = text:gsub('%s+',function(c) return c:sub(1,1) end);
I would have just done gsub('%s+',' ') but I wanted to preserve the first type of whitespace used. |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 20 May 2016 06:11 PM |
Thanks eLunate. How did that MC world generator game go?
|
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 May 2016 06:15 PM |
Hmmph, I haven't actually touched anything practical to do with Roblox in forever since Valkyrie.
I have a better infinite world generation thingy sandbox thing idea but I'll do it after Valkyrie because priorities. |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 20 May 2016 06:17 PM |
Ah ok. Now that there is universes you could make a pretty cool game with it.
|
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 May 2016 06:19 PM |
| It would be good to get to write something with Valkyrie too. |
|
|
| Report Abuse |
|
|
|
| 20 May 2016 06:23 PM |
I don't suppose you can provide a link to some Valkyrie documentation or the like please? I was quite interested but it turned to apathy when the 'daily' CC ended (Which to be fair went on for 6 days or something like that (IDK the numbering system was beyond me :P), making you the most dedicated amateur blogger of all time)
Private Drive - Residents Only |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 20 May 2016 06:28 PM |
The thing about making daily stuff is that eventually I run out of stuff to write, somebody is bound to get pissy (Tynezz. Prick.), and I'm often quite busy.
I'd write the daily stuff again, because I enjoyed it, but it would have to have some better medium.
As for documentation, we have our own documentation project and format so like enjoy the current state of it https://github.com/CrescentCode/CrescentDocs |
|
|
| Report Abuse |
|
|