0.0
No commit activity in last 3 years
No release in over 3 years
Wraps and unwraps strings with quotes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies
 Project Readme

quote_unquote

Wraps (and unwraps) strings with quotes.

Installation

gem install quote_unquote

Examples

require 'quote_unquote'

"hello".q     # 'hello'
"hello".qq    # "hello"

"'hello'".uq  # hello
'"hello"'.uqq # hello

"Is this a joke?" "Yup."

Slightly, just slightly more useful examples

# Escapes the quotation marks
"I'm good".q("''")            # 'I''m good'
"I'm good".q("''").uq("''")   # I'm good

Copyright

Copyright (c) 2011 Junegunn Choi. See LICENSE.txt for further details.