You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the Extension (the Portion of Filename in Path starting from the last Period).
1374
+
1375
+
Example usage:
1376
+
1377
+
```puppet
1378
+
stdlib::extname('test.rb') =>'.rb'
1379
+
stdlib::extname('a/b/d/test.rb') =>'.rb'
1380
+
stdlib::extname('test') =>''
1381
+
stdlib::extname('.profile') =>''
1382
+
```
1383
+
1384
+
*Type*: rvalue.
1385
+
1371
1386
#### `fact`
1372
1387
1373
1388
Return the value of a given fact. Supports the use of dot-notation for referring to structured facts. If a fact requested does not exist, returns Undef.
@@ -1969,12 +1984,12 @@ Arguments: A numeric or a string representing a number.
1969
1984
1970
1985
#### `num2bool`
1971
1986
1972
-
Converts a number, or a string representation of a number, into a true Boolean.
1987
+
Converts a number, or a string representation of a number, into a true Boolean.
1973
1988
Zero or anything non-numeric becomes `false`.
1974
1989
Numbers greater than zero become `true`.
1975
1990
1976
1991
Since Puppet 5.0.0, the same can be achieved with the Puppet type system.
1977
-
See the [`Boolean.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-boolean)
1992
+
See the [`Boolean.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-boolean)
1978
1993
functionin Puppet for the many available type conversions.
1979
1994
1980
1995
Boolean(0) # false
@@ -2236,7 +2251,7 @@ Replaces consecutive repeats (such as 'aaaa') in a string with a single characte
2236
2251
Converts certain strings to a Boolean. This attempts to convert strings that contain the values '1', 'true', 't', 'y', or 'yes' to `true`. Strings that contain values '0', 'false', 'f', 'n', or 'no', or that are an empty string or undefined are converted to `false`. Any other value causes an error. These checks are case insensitive.
2237
2252
2238
2253
Since Puppet 5.0.0, the same can be achieved with the Puppet type system.
2239
-
See the [`Boolean.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-boolean)
2254
+
See the [`Boolean.new`](https://puppet.com/docs/puppet/latest/function.html#conversion-to-boolean)
2240
2255
functionin Puppet for the many available type conversions.
2241
2256
2242
2257
Boolean('false'), Boolean('n'), Boolean('no') # all false
0 commit comments