String

  • blank
  • camelize
  • capitalize
  • dasherize
  • empty
  • endsWith
  • escapeHTML
  • evalJSON
  • evalScripts
  • extractScripts
  • gsub
  • include
  • inspect
  • interpolate
  • isJSON
  • parseQuery
  • scan
  • startsWith
  • strip
  • stripScripts
  • stripTags
  • sub
  • succ
  • times
  • toArray
  • toJSON
  • toQueryParams
  • truncate
  • underscore
  • unescapeHTML
  • unfilterJSON

API Docs

  • Utility Methods
  • Ajax
  • Array
  • Class
  • Date
  • Element
  • Element.Methods
  • Element.Methods.Simulated
  • Enumerable
  • Event
  • Form
  • Form.Element
  • Function
  • Hash
  • Insertion
  • Number
  • Object
  • ObjectRange
  • PeriodicalExecuter
  • Position
  • Prototype
  • String
  • Template
  • TimedObserver
  • document
  • document.viewport

include
1.5.1

include(substring) -> Boolean

Check if the string contains a substring.

Example


'Prototype framework'.include('frame');
//-> true
'Prototype framework'.include('frameset');
//-> false
© 2006-2007 Prototype Core Team | Licenses: MIT (source code) and CC BY-SA (documentation). mephisto-badge-tiny