Advertisement
stronk7

Untitled

Oct 18th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. function conv_case($charset, $string, $case) {
  2. if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['t3lib_cs_utils'] == 'mbstring') {
  3. if ($case == 'toLower') {
  4. $string = mb_strtolower($string, $charset);
  5. } else {
  6. $string = mb_strtoupper($string, $charset);
  7. }
  8. } elseif ($charset == 'utf-8') {
  9. $string = $this->utf8_char_mapping($string, 'case', $case);
  10. } elseif (isset($this->eucBasedSets[$charset])) {
  11. $string = $this->euc_char_mapping($string, $charset, 'case', $case);
  12. } else {
  13. // treat everything else as single-byte encoding
  14. $string = $this->sb_char_mapping($string, $charset, 'case', $case);
  15. }
  16.  
  17. return $string;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement