#Japt, (削除) 51 (削除ここまで)(削除) 48 (削除ここまで)(削除) 45 (削除ここまで)(削除) 36 (削除ここまで)(削除) 33 (削除ここまで) 19 bytes
Japt, (削除) 51 (削除ここまで)(削除) 48 (削除ここまで)(削除) 45 (削除ここまで)(削除) 36 (削除ここまで)(削除) 33 (削除ここまで) 19 bytes
#Japt, (削除) 51 (削除ここまで)(削除) 48 (削除ここまで)(削除) 45 (削除ここまで)(削除) 36 (削除ここまで)(削除) 33 (削除ここまで) 19 bytes
Japt, (削除) 51 (削除ここまで)(削除) 48 (削除ここまで)(削除) 45 (削除ここまで)(削除) 36 (削除ここまで)(削除) 33 (削除ここまで) 19 bytes
Here's a basic demonstration of how and why this works (using . as the filler charin place of a space):
Here's a basic demonstration of how and why this works (using . as the filler char):
Here's a basic demonstration of how and why this works (using . in place of a space):
Here's a basic demonstration of how and why this works (using . as the filler char):
antant // Starting with "antant"First andmatch replacingat withthe threeend: spaces,
eleant
ele.. (ant // this)
el.. is the next step(eel)
. However, the three.. spaces at the beginning are(elk)
false //.. now replaced, ending the recursive replacement(...)
true
antant // Replacing with two spaces, however, there's no chance for it to
ant //First match three spaces in the next step, so it matches "boa" at the beginning,:
antmua
..mua nt (ant)
...a //(emu)
..a then "ant" once more here(...)
.. // All that's left now is(boa)
true
First threematch spaces,in whichthe becomesmiddle: two
cantay
c..ay spaces, then stops.(ant)
true..ay (cat)
... // Now the string is(jay)
.. only spaces, so true is returned(...)
true
Here's a basic demonstration of how this works:
antant // Starting with "antant" and replacing with three spaces,
ant // this is the next step. However, the three spaces at the beginning are
false // now replaced, ending the recursive replacement.
antant // Replacing with two spaces, however, there's no chance for it to
ant // match three spaces in the next step, so it matches "boa" at the beginning,
nt // then "ant" once more here.
// All that's left now is three spaces, which becomes two spaces, then stops.
true // Now the string is only spaces, so true is returned.
Here's a basic demonstration of how and why this works (using . as the filler char):
First match at the end:
eleant
ele.. (ant)
el.. (eel)
... (elk)
.. (...)
true
First match at the beginning:
antmua
..mua (ant)
...a (emu)
..a (...)
.. (boa)
true
First match in the middle:
cantay
c..ay (ant)
..ay (cat)
... (jay)
.. (...)
true
- 50.3k
- 6
- 96
- 241