* @package be.bastelstu.wcf.chat * @subpackage system.chat.commands */ class ChatCommandHandler { const COMMAND_CHAR = '/'; /** * Checks whether the given text is a command. * * @param string $text * @return boolean */ public function isCommand($text) { return StringUtil::substring($text, 0, StringUtil::length(static::COMMAND_CHAR)) == static::COMMAND_CHAR; } }