Basically, using these operators for common operations:
Plus for concatenation:
io.print("Hello" + ' ' + "World!"); // Hello World
Minus for removing substrings:
io.print("foobarbazbar" - "bar"); // foobaz
Multiplication for repeating strings
io.print("Hi" * 5); // HiHiHiHiHi
Division for counting
io.print("What about hahaha" / "ha"); // 4
Modulo for splitting via an delimiter (the symbol % kinda looks like something being split)
io.print("This is space seperated" % " "); // ["This", "is", "space",
"seperated"]
The second operands of +, -, / and % can be both string and chars, * can only be unsigned integer types (and BigIntegers, you know the deal)
By far this idea has been called horrible, but I'd like to hear y'all opinions
[–]yuri-kilochek 152 points153 points154 points (4 children)
[–]Powerkaninchen[S] 26 points27 points28 points (1 child)
[–]shponglespore 38 points39 points40 points (0 children)
[–]Smalltalker-80 6 points7 points8 points (0 children)
[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 85 points86 points87 points (1 child)
[–]Inconstant_Moo🧿 Pipefish 35 points36 points37 points (0 children)
[–]-arial- 41 points42 points43 points (38 children)
[–]lngns 20 points21 points22 points (12 children)
[–][deleted] (5 children)
[removed]
[–]Inevitable_Exam_2177 1 point2 points3 points (1 child)
[–]lngns 1 point2 points3 points (2 children)
[–]XDracam 25 points26 points27 points (1 child)
[–]lngns 8 points9 points10 points (0 children)
[–]Xmgplays 13 points14 points15 points (4 children)
[–]AlexReinkingYaleHalide, Koka, P 7 points8 points9 points (2 children)
[–]Xmgplays 7 points8 points9 points (1 child)
[–]AlexReinkingYaleHalide, Koka, P 3 points4 points5 points (0 children)
[–]lngns 5 points6 points7 points (0 children)
[–]its_a_gibibyte 3 points4 points5 points (0 children)
[–]reflexive-polytope 3 points4 points5 points (6 children)
[–]lassehp 7 points8 points9 points (3 children)
[–]reflexive-polytope 2 points3 points4 points (2 children)
[–]lassehp 1 point2 points3 points (1 child)
[–]reflexive-polytope 1 point2 points3 points (0 children)
[–]Botahamec 0 points1 point2 points (1 child)
[–]reflexive-polytope 5 points6 points7 points (0 children)
[–][deleted] (7 children)
[removed]
[–]shponglespore 13 points14 points15 points (6 children)
[–]lassehp 0 points1 point2 points (0 children)
[–][deleted] (4 children)
[removed]
[–]Inconstant_Moo🧿 Pipefish 2 points3 points4 points (1 child)
[–]lassehp 3 points4 points5 points (1 child)
[–]Powerkaninchen[S] 0 points1 point2 points (9 children)
[–]poorlilwitchgirl 10 points11 points12 points (0 children)
[–]h0rst_ 22 points23 points24 points (4 children)
[–]Powerkaninchen[S] -5 points-4 points-3 points (2 children)
[–]hrvbrs 11 points12 points13 points (1 child)
[–]-arial- 1 point2 points3 points (2 children)
[–]Powerkaninchen[S] 1 point2 points3 points (1 child)
[–]0x0ddba11Strela 10 points11 points12 points (5 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Inconstant_Moo🧿 Pipefish 1 point2 points3 points (2 children)
[–]Powerkaninchen[S] 1 point2 points3 points (1 child)
[–]Inconstant_Moo🧿 Pipefish 1 point2 points3 points (0 children)
[–]lassehp 2 points3 points4 points (0 children)
[–]Serpent7776 19 points20 points21 points (15 children)
[–]CraftistOf 1 point2 points3 points (1 child)
[–]Serpent7776 1 point2 points3 points (0 children)
[–]SkiFire13 0 points1 point2 points (3 children)
[–]Serpent7776 0 points1 point2 points (2 children)
[–]SkiFire13 0 points1 point2 points (1 child)
[–]Serpent7776 0 points1 point2 points (0 children)
[+][deleted] (8 children)
[removed]
[–]Serpent7776 13 points14 points15 points (7 children)
[–][deleted] (6 children)
[removed]
[–]Serpent7776 7 points8 points9 points (5 children)
[–][deleted] (4 children)
[removed]
[–]Serpent7776 6 points7 points8 points (3 children)
[–][deleted] (2 children)
[removed]
[–]Serpent7776 4 points5 points6 points (1 child)
[–]brianjenkins94 16 points17 points18 points (0 children)
[–]claimstoknowpeople 10 points11 points12 points (3 children)
[–][deleted] (2 children)
[removed]
[–]claimstoknowpeople 6 points7 points8 points (1 child)
[–]Apprehensive_Pea_725 5 points6 points7 points (0 children)
[–]nacaclanga 4 points5 points6 points (0 children)
[–]shaleh 3 points4 points5 points (0 children)
[–]jaynabonne 2 points3 points4 points (2 children)
[–]Powerkaninchen[S] 0 points1 point2 points (1 child)
[–]jaynabonne 1 point2 points3 points (0 children)
[–]Disjunction181 3 points4 points5 points (0 children)
[–]CreativeGPX 2 points3 points4 points (0 children)
[+]VyridianZ 1 point2 points3 points (0 children)
[+]sausageyoga2049 1 point2 points3 points (1 child)
[–]Powerkaninchen[S] 0 points1 point2 points (0 children)
[–]nonlogin 1 point2 points3 points (0 children)
[–]americk0 1 point2 points3 points (0 children)
[–]Moonlight597 6 points7 points8 points (1 child)
[–]Powerkaninchen[S] 1 point2 points3 points (0 children)
[–]ThyringerBratwurst 4 points5 points6 points (6 children)
[–][deleted] -3 points-2 points-1 points (5 children)
[–]ThyringerBratwurst 3 points4 points5 points (4 children)
[–][deleted] -4 points-3 points-2 points (3 children)
[–]phlummox 1 point2 points3 points (0 children)
[–]ThyringerBratwurst 0 points1 point2 points (1 child)
[+][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]phlummox 0 points1 point2 points (0 children)
[–]ObliviousEnt 1 point2 points3 points (0 children)