Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) (削除) 59 (削除ここまで) 33(削除) 33 (削除ここまで) 32 bytes
-25 bytes thanks to Giuseppe
-1 byte thanks to val
print(#arg[1]#(...):gsub("(.)%1","")<1)
Removes every doubled character, then checks if the result is empty.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) (削除) 59 (削除ここまで) 33 bytes
-25 bytes thanks to Giuseppe
print(#arg[1]:gsub("(.)%1","")<1)
Removes every doubled character, then checks if the result is empty.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) (削除) 59 (削除ここまで) (削除) 33 (削除ここまで) 32 bytes
-25 bytes thanks to Giuseppe
-1 byte thanks to val
print(#(...):gsub("(.)%1","")<1)
Removes every doubled character, then checks if the result is empty.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) 59(削除) 59 (削除ここまで) 33 bytes
-25 bytes thanks to Giuseppe
i=arg[1]for j=1,#i do i=iprint(#arg[1]:gsub("^"(.)%1","")end print(i==""<1)
Removes the first two characters if they'reevery doubled character, then checks if the result is empty. Did a bit of a cheese by making the loop run for each character of input.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) 59 bytes
i=arg[1]for j=1,#i do i=i:gsub("^(.)%1","")end print(i=="")
Removes the first two characters if they're doubled, then checks if the result is empty. Did a bit of a cheese by making the loop run for each character of input.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) (削除) 59 (削除ここまで) 33 bytes
-25 bytes thanks to Giuseppe
print(#arg[1]:gsub("(.)%1","")<1)
Removes every doubled character, then checks if the result is empty.
- 161
- 3
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) 63(削除) 63 (削除ここまで) 59 bytes
i=arg[1]whilei=arg[1]for i~=jj=1,#i do j=i;i=ii=i:gsub("^(.)%1","")end;printend print(i=="")
Reads input, clones to another variable, then replaces every instance ofRemoves the first two characters repeating, while checking that both "offset" variables are equal. This will only be true when it can no longer find a pair of characters at the start (so either it's no longer double speakif they're doubled, or it finished the job). Prints truethen checks if the final result is empty.
# [Lua],
i=arg[1]for k in i:gmatch("(.)%1")do i=i:sub(3)end print(i=="")
Similar to the previous version, but with Did a slightly different approach (for loop that substrings, rather than whilebit of a cheese by making the loop with gsub)run for each character of input.
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) 63 bytes
i=arg[1]while i~=j do j=i;i=i:gsub("^(.)%1","")end;print(i=="")
Reads input, clones to another variable, then replaces every instance of the first two characters repeating, while checking that both "offset" variables are equal. This will only be true when it can no longer find a pair of characters at the start (so either it's no longer double speak, or it finished the job). Prints true if the final result is empty.
# [Lua],
i=arg[1]for k in i:gmatch("(.)%1")do i=i:sub(3)end print(i=="")
Similar to the previous version, but with a slightly different approach (for loop that substrings, rather than while loop with gsub).
Lua, (削除) 67 (削除ここまで) (削除) 66 (削除ここまで) (削除) 63 (削除ここまで) 59 bytes
i=arg[1]for j=1,#i do i=i:gsub("^(.)%1","")end print(i=="")
Removes the first two characters if they're doubled, then checks if the result is empty. Did a bit of a cheese by making the loop run for each character of input.
- 161
- 3
- 161
- 3