Clear Spaces |
|
Pesky spaces in chat? I can fix that! [More] |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Lugia319.ClearSpaces##version=2 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Lugia319.ClearSpaces##version=2 |
Update: Ter13 showed me that you can still input the tab character by copying it from charmap. I've added a fix so you can't spam tab to win.
It's not big, but it's useful. I spent a lot of time looking for this, but I couldn't find anything that specifically handled this issue, so I made it myself. Suppose you want to make a chat function verb This offered NO protection against strings like this with large numbers of spaces. So I fixed it. With my code; var/String = ClearSpaces(T) |
Kozuma3: (Mar 27 2015, 10:29 am)
Made this pretty fast, profiled all 3 with 1000 calls.
Lugia319: (Dec 19 2013, 8:48 am)
Yes, in all honesty, there's just so much clutter that you can never really find what you want unless you know EXACTLY what it is or where it is. And if you're looking for something that you don't know exists, it get's troublesome.
Kaiochao: (Dec 18 2013, 7:21 pm)
In the meantime, these are most (if not all) of the posts that were in Jtgibson's member forum, AKA the Snippets Database.
http://www.byond.com/ forum/?command=search&posts=1&scope=local&forum=22&text=%22c ontributed+by%22 Toddab503: (Dec 18 2013, 7:11 pm)
You've just given an idea. While it's not exactly the most obvious for new members, there are search features, and topics for all the major resources, tutorials, etc. Snippets, though, are pretty scattered for the most part. So, maybe it would be a good idea for people to gather all of the best snippets into one post?
Kaiochao: (Dec 18 2013, 5:51 pm)
http://www.byond.com/forum/?post=195043
If the Snippets Database still existed in its organized form, I'm sure you would've found it easier. It doesn't have your "clear middle spaces" function, though. |
Copyright © 2024 BYOND Software.
All rights reserved.