If you have your text in your_text
variable, you can use:
your_text[0..29]
More Related Contents:
- How to write a switch statement in Ruby
- Ruby class instance variable vs. class variable
- Ruby Gem install Json fails on Mavericks and Xcode 5.1 – unknown argument: ‘-multiply_definedsuppress’
- Blocks and yields in Ruby
- Best way to require all files from a directory in ruby?
- What does %w(array) mean?
- How to make a HTTP request using Ruby on Rails?
- Continuously read from STDOUT of external process in Ruby
- Ruby’s double colon (::) operator usage differences
- When to use `self.foo` instead of `foo` in Ruby methods
- What is the “=~” operator in Ruby?
- Ruby send JSON request
- Is the ruby operator ||= intelligent?
- Invalid active developer path on MAC OS X after installing Ruby
- Ruby method Array#
- What does ||= mean in Ruby? [duplicate]
- How to avoid tripping over UTF-8 BOM when reading files
- String concatenation in Ruby
- What is the difference between print and puts?
- Read binary file as string in Ruby
- How to sort an array in Ruby to a particular order?
- Fibonacci sequence in Ruby (recursion)
- Sort order in `Dir.entries`
- setSpeed in Selenium WebDriver using Ruby
- Why doesn’t Ruby find classes in a higher scope when module is specified using ::?
- Ruby: Installing rmagick on Ubuntu
- How to understand the difference between class_eval() and instance_eval()?
- What is the best way to split a string to get all the substrings by Ruby?
- Insert digital signature into existing pdf file
- Read and write YAML files without destroying anchors and aliases?