Okay, I'll bite and imagine that Carmen Sandiego has stolen all the regular expressions!
defmoduleDarnYouCarmendo# Quick, destroy the question marks before she steals them, too!defwhats_a_question(string,processed\\[])defwhats_a_question("",processed),do:IO.chardata_to_binary(processed)defwhats_a_question("?"<>string,processed),do:whats_a_question(string,processed)defwhats_a_question(<<next::utf8>><>string,processed),do:whats_a_question(string,[processed,next]endDarnYouCarmen.whats_a_question("What is this? What's happening??")# "What is this What's happening"
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
... 😐
I mean... that's not even a function to write. It's a function to call.
Elixir:
Ruby:
JavaScript:
Bash:
Okay, I'll bite and imagine that Carmen Sandiego has stolen all the regular expressions!