mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-19270 - Quiz graph - Fix reverse display of Hebrew legend text in RTL mode
This commit is contained in:
parent
7a4832ecb9
commit
cdf8a0c262
2 changed files with 14 additions and 1 deletions
|
@ -378,6 +378,18 @@ class core_text {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse UTF-8 multibytes character sets (used for RTL languages)
|
||||
* (We only do this because there is no mb_strrev or iconv_strrev)
|
||||
*
|
||||
* @param string $str the multibyte string to reverse
|
||||
* @return string the reversed multi byte string
|
||||
*/
|
||||
public static function strrev($str) {
|
||||
preg_match_all('/./us', $str, $ar);
|
||||
return join('', array_reverse($ar[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to convert upper unicode characters to plain ascii,
|
||||
* the returned string may contain unconverted unicode characters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue