From: Cameron Ball Date: Wed, 19 Dec 2018 03:16:51 +0000 (+0800) Subject: Add stringAndCode function X-Git-Url: http://git.cameron1729.xyz/?p=SonOfLokstallBot.git;a=commitdiff_plain;h=11057c00af72ee40d60735ede17bab8cf60ee770 Add stringAndCode function --- diff --git a/common.php b/common.php index 1d996ef..a6e9212 100644 --- a/common.php +++ b/common.php @@ -79,6 +79,11 @@ function getString($identifier, ...$vars) { return isset($strings[$identifier]) ? sprintf($strings[$identifier], ...$vars) : "[[$identifier]]"; } +const getStringAndCode = 'getStringAndCode'; +function getStringAndCode($string) { + return getString($string) . " (" . $string . ")"; +}; + function formatDate($date) { return $date->format(DATE_FORMAT); }