Added FSplitString helper rule, which splits a string at a given delimiter
character, returning a component list. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30872 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -65,6 +65,20 @@ rule FGetGrist
|
|||||||
return [ Match <(.*)> : $(grist) ] ;
|
return [ Match <(.*)> : $(grist) ] ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rule FSplitString string : delimiterChar
|
||||||
|
{
|
||||||
|
local result ;
|
||||||
|
|
||||||
|
while $(string) {
|
||||||
|
local split = [ Match $(delimiterChar)*([^$(delimiterChar)]+)(.*)
|
||||||
|
: $(string) ] ;
|
||||||
|
result += $(split[1]) ;
|
||||||
|
string = $(split[2-]) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $(result) ;
|
||||||
|
}
|
||||||
|
|
||||||
rule FSplitPath
|
rule FSplitPath
|
||||||
{
|
{
|
||||||
# SplitPath <path> ;
|
# SplitPath <path> ;
|
||||||
|
|||||||
Reference in New Issue
Block a user