PHP has a god multibyte support. But some functions I often need when dealing with UTF8 strings are missing.
In years of coding you start to “invent” the wheel over and over again and again but sometimes you really need your own implementations.
For example, when working with Java Script within frameworks like Pentaho Data Integration you can not use 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 need it.
Because of this issues I collect often needed, small and self-contained functions here in my “Code Kitchen”: