Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#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

added 1 character in body
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

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):

more explanation
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

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
golfed 14 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
golfed another byte
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
golfed a byte thanks to a feature, and another thanks to a bug
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
golfed 9 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
added 13 characters in body
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
added 125 characters in body
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
golfed three more bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
golfed three more bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
added explanation
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading

AltStyle によって変換されたページ (->オリジナル) /