PHP has an god multibyte support. But some functions are missing which I need often when dealing with UTF8 strings.
In years of coding you start to “invent” the wheel over and over again and again and sometimes you really need your own implementations.
For example, when working with Java Script within frameworks like Pentaho Data Integration you can not use fancy third party libraries to solve standard problems. Often third party libraries are also to big or you only need a small fraction of its capability. And the almost “classical” problem with third party libraries is: they solved your problem not exactly as you needet it.
Because of this problems I started to collect often needed, small and self-contained functions in my “Code Kitchen”:
One of the standard tasks I needed often is “parsing URLs to its components”. Here you find my simple RegExp driven solution for this problem. advantages small & fast ready to use uses only build in standard features it will work in more than 98%…