blob: cfb3ab59e20afee20cc2022b5b59124e81b6e1cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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
|