https://github.com/airbnb/collapstring
Collapse quoted strings in strings
https://github.com/airbnb/collapstring
Last synced: about 2 months ago
JSON representation
Collapse quoted strings in strings
- Host: GitHub
- URL: https://github.com/airbnb/collapstring
- Owner: airbnb
- License: mit
- Created: 2014-03-15T14:30:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-10T04:33:43.000Z (over 11 years ago)
- Last Synced: 2025-08-16T12:45:05.272Z (2 months ago)
- Language: Java
- Homepage:
- Size: 461 KB
- Stars: 7
- Watchers: 285
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://travis-ci.org/airbnb/collapstring)
# Collapstring
Collapse quoted strings in strings. Supports MRI, Rubinius & JRuby.
## Why?
It's a simple, reliable and fast way to start making MySQL
requests shorter in a SQL logging pipeline.
## Installation
Add this line to your application's Gemfile:
gem 'collapstring'
And then execute:
$ bundle
Or install it yourself as:
$ gem install collapstring
## Usage
require 'collapstring'
Collapstring.collapse 'SELECT "hello \"world\"";'
Collapstring.collapse! 'SELECT "hello \"world\"";' # _could_ be in-place
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request