Last active
August 29, 2015 14:03
-
-
Save mrvdb/4adbdbbc73169d0a107e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check_if_twist_starts_with_special_char ($send_only_when_msg_starts_with_this_char, $text) { | |
// Flag not set? Send it through | |
if (empty($send_only_when_msg_starts_with_this_char)) return true; | |
// Otherwise, only send if char mathes first of content | |
if ($text[0] === $send_only_when_msg_starts_with_this_char) return true; | |
// Still here, don't send it. | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment