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