diff options
Diffstat (limited to 'lib/puppet/parser/functions/strlength.rb')
-rw-r--r-- | lib/puppet/parser/functions/strlength.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/strlength.rb b/lib/puppet/parser/functions/strlength.rb new file mode 100644 index 0000000..147b24a --- /dev/null +++ b/lib/puppet/parser/functions/strlength.rb @@ -0,0 +1,6 @@ +module Puppet::Parser::Functions + newfunction(:strlength, :type => :rvalue) do |args| + args[0].to_s.length + end +end + |