aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/string.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] require_relative => requireAkira Matsuda2017-10-211-13/+13
| | | | This basically reverts 8da30ad6be34339124ba4cb4e36aea260dda12bc
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* [Active Support] require => require_relativeAkira Matsuda2017-07-011-13/+13
|
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-13/+13
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* `fast_xs` support has been removed. Use 'String#encode(xml: :attr)`.Aaron Patterson2013-04-051-1/+0
|
* Add String#in_time_zone methodAndrew White2012-12-111-0/+1
| | | | | | This commit adds a convenience method for converting a string to an ActiveSupport::TimeWithZone instance using the configured Time.zone or another passed as an argument.
* defines String#indent [closes #7263] [Xavier Noria & Ace Suares]Xavier Noria2012-08-071-0/+1
|
* remove backported string interpolationVasiliy Ermolovich2012-05-151-1/+0
|
* remove unnecessary require core_ext/string/encodingSergey Nartimov2012-02-141-1/+0
|
* Add String#inquiry as a convenience method for turning a string into a ↵David Heinemeier Hansson2011-04-181-0/+1
| | | | StringInquirer object [DHH]
* implements String#strip_heredocXavier Noria2010-08-291-1/+2
|
* Require encoding.rbwycats2010-06-081-0/+1
|
* String#exclude? core extension: inverse of #include?Jeremy Kemper2009-12-271-1/+2
|
* String#each_char is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-1/+0
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-1/+2
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Ruby 1.9 style String interpolation support for lower ruby versions. Thanks ↵Lawrence Pit2009-07-071-0/+1
| | | | | | to code from Masao Mutoh's GetText gem. [#2870 state:resolved] Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
* Convert string extension modules to class reopensJeremy Kemper2009-04-221-10/+0
|
* Convert String conversions, filters, starts/ends_with, and multibyte ↵Jeremy Kemper2009-03-281-8/+5
| | | | extension modules to class reopen
* Simplify ActiveSupport::Multibyte and make it run on Ruby 1.9.Manfred Stienstra2008-09-211-2/+4
| | | | | | * Unicode methods are now defined directly on Chars instead of a handler * Updated Unicode database to Unicode 5.1.0 * Improved documentation
* Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵Manfred Stienstra2008-09-111-0/+2
| | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed]
* Ruby 1.8.7 compat: String#start_with? and #end_with?Jeremy Kemper2008-04-201-10/+3
|
* Add String#squish and String#squish! to remove consecutive chunks of ↵Michael Koziarski2008-02-161-0/+2
| | | | | | whitespace. Closes #11123 [jordi, Henrik N] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: prefer builtin String#starts_ and ends_with? if available ↵Jeremy Kemper2007-12-151-1/+6
| | | | | | [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* String#to_xs uses the fast_xs extension if available for Builder speedup.Jeremy Kemper2007-10-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat, consistent load pathsJeremy Kemper2007-10-021-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some 1.9 forward compatibilityJeremy Kemper2007-09-141-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveSupport::Multibyte. Provides String#chars which lets you deal ↵Michael Koziarski2006-10-031-0/+2
| | | | | | with strings as a sequence of chars, not of bytes. Closes #6242 [Julian Tarkhanov, Manfred Stienstra & Jan Behrens] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5223 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to ↵Sam Stephenson2005-12-271-0/+2
| | | | | | JSON strings git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#starts_with? and String#ends_with? #2118 [thijs@vandervossen.net]David Heinemeier Hansson2005-09-091-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#at, String#from, String#to, String#first, String#last in ↵David Heinemeier Hansson2005-09-031-1/+3
| | | | | | ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access. Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#to_time and String#to_date for wrapping ParseDateDavid Heinemeier Hansson2005-03-021-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-151-0/+5
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de