blob: c555d676e578c57c3f5491544b8ba4c6a63afcea (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
module Puppet::Parser::Functions
newfunction(:split, :type => :rvalue,
:doc => "Split a string variable into an array using the specified split character.
Usage::
$string = 'value1,value2'
$array_var = split($string, ',')
$array_var holds the result ['value1', 'value2']") do |args|
return args[0].split(args[1])
end
end
|