getPrefix function

string getPrefix(inputString, matchString)

inputString string

matchString string

Returns inputString up to the first occurrence of matchString.

This function extracts the inputString from the start of the inputString up to the beginning of the matchString.

Related

Examples

getPrefix("rule your city with cityengine", "city")
# result = "rule your "

getPrefix("myTexture.has.prefix.jpg", ".")
# result = "myTexture"