getPrefix function

This 2019.0 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Syntax

  • string getPrefix(string inputstring, string matchString)

Returns

Extract inputString up to first occurrence of matchString.

Description

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

Related

Examples

example.1
	getPrefix("rule your city with cityengine","city")
	# result = "rule your "
example.2
	getPrefix("myTexture.has.prefix.jpg",".")
	# result = "myTexture"

In this topic