blob: 8932bfe38dfee07560fd17cde6ae870584a94b47 (
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
|