added a strlength function to get the length of a string into puppet
This commit is contained in:
parent
49b127b80a
commit
61d767b561
1 changed files with 6 additions and 0 deletions
6
plugins/puppet/parser/functions/strlength.rb
Normal file
6
plugins/puppet/parser/functions/strlength.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
module Puppet::Parser::Functions
|
||||
newfunction(:strlength, :type => :rvalue) do |args|
|
||||
argv[0].to_s.length
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in a new issue