mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-08-12 16:24:00 +02:00
Support for various Unicode spaces in toAscii()
* no-break space (U+00A0) * thin space (U+2009) * narrow no-break space (U+202F) * ideographic space (U+3000)
This commit is contained in:
@@ -508,7 +508,9 @@ class Stringy implements \Countable, \IteratorAggregate, \ArrayAccess
|
|||||||
'TS' => array('Ц'),
|
'TS' => array('Ц'),
|
||||||
'YA' => array('Я'),
|
'YA' => array('Я'),
|
||||||
'YU' => array('Ю'),
|
'YU' => array('Ю'),
|
||||||
'ZH' => array('Ж')
|
'ZH' => array('Ж'),
|
||||||
|
' ' => array("\xC2\xA0", "\xE2\x80\x89", "\xE2\x80\xAF",
|
||||||
|
"\xE3\x80\x80"),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($charsArray as $key => $value) {
|
foreach ($charsArray as $key => $value) {
|
||||||
|
@@ -189,7 +189,10 @@ abstract class CommonTest extends PHPUnit_Framework_TestCase
|
|||||||
array('perevirka', 'перевірка'),
|
array('perevirka', 'перевірка'),
|
||||||
array('lysaya gora', 'лысая гора'),
|
array('lysaya gora', 'лысая гора'),
|
||||||
array('shchuka', 'щука'),
|
array('shchuka', 'щука'),
|
||||||
array('', '漢字')
|
array('', '漢字'),
|
||||||
|
array(' ', ' '), // no-break space
|
||||||
|
array(' 1 2 3 ', ' 1 2 3 '), // ideographic spaces
|
||||||
|
array(' ', ' '), // thin space and space
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user