PHP Function Grapheme Strpos()
The php function grapheme_strpos() finds the first occurrence of a case-insensitive string in another string. The function works similar to strpos() and stripos(), but it is based on grapheme units instead of bytes and characters.
string = original_str haystack = string
needle = string to search for in haystack
start = index of haystack that is the beginning of the first occurrence of needle
if (start >= len(haystack)-1): return part of haystack that contains needle
if (start + 1): return part of haystack before the first occurrence of needle
if haystack[start+ 1] in needle: return part of haystack + needle
if haystack[start+] not in needle: return part of haystack - needle
if haystack == needle: return False
if start!= len(haystack)-1: return False
This article will help you understand the php function grapheme_strpos() in detail. Also, you will learn how to use it along with other native functions like strchr() and stscroll() in your code.