Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/snmputils/stringutils.rb
Instance Method Summary collapse
-
#take(n = 1) ⇒ String
Return the first N characters in the string.
Instance Method Details
#take(n = 1) ⇒ String
Return the first N characters in the string
12 13 14 |
# File 'lib/snmputils/stringutils.rb', line 12 def take(n=1) chars.to_a.take(n).join('') end |