Universeorange.com/Docs/

R3m/framework Function reference string.substring.count.case.insensitive

{string.substring.count.case.insensitive(String $haystack, String $needle, Int $offset=0, Int $length=null)}

Count the number of substring occurrences.

{string.substring.count()} returns the number of times the needle substring occurs in the haystack string.
Please note that needle is case-insensitive.

haystack 
    The string to search in
needle
    The substring to search for
offset
    The offset where to start counting. 
    If the offset is negative, counting starts from the end of the string.
length
    The maximum length after the specified offset to search for the substring. 
    It outputs a warning if the offset plus the length is greater than the haystack length. 
    A negative length counts from the end of haystack.

This function returns an int.

More information:

https://www.php.net/manual/en/function.substr-count.php

Last modified: 2021-06-07

© 2021 universeorange.com