0

Since I'm new to laravel, I'm trying codes from the documentation. I got to the helper classes.

When in my controller I wrote the code bellow,

        $a='გიორგი გოგიავა';
        $b="George Gogiava";
        echo Str::length($a), '</br>';
        echo Str::padLeft($b,  20, '*'), '</br>';
        echo Str::of($a)->padLeft(40, '*');

I got the following answer:

******George Gogiava გიორგი გოგიავა 14

Firstly, I'm surprised that he printed the length at the end, and secondly, as you can see, the function does not work with Unicode.

I am waiting for an explanation about this and how to solve it?

Leo Garsia
  • 105
  • 1
  • 10

0 Answers0