As per the usage of @whatComesBeforeFirst(String,char), it takes String and character as arguments but you are passing string "I-" which is not vailid as per the usage.
Below is the usage
Returns the portion of string1 that comes before the first occurrence of the specified character.
If that character is not in the string, returns whole string.
input source string, token character to locate
return sub-string that appears before token.