Skip to content

Commit f12881c

Browse files
committed
add helper patch to remove strings
1 parent 584e1ad commit f12881c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- /dev/null
2+
+++ ../Helper/Helper.php
3+
@@ -46,6 +46,7 @@
4+
public static function width(?string $string): int
5+
{
6+
$string ??= '';
7+
+ return \strlen($string);
8+
9+
if (preg_match('//u', $string)) {
10+
return (new UnicodeString($string))->width(false);
11+
@@ -65,6 +66,7 @@
12+
public static function length(?string $string): int
13+
{
14+
$string ??= '';
15+
+ return \strlen($string);
16+
17+
if (preg_match('//u', $string)) {
18+
return (new UnicodeString($string))->length();

0 commit comments

Comments
 (0)