Skip to content

class Crystal::Macros::StringLiteral
inherits Crystal::Macros::ASTNode

A string literal.

Methods

#<(other : StringLiteral | MacroId) : BoolLiteral

Similar to String#<

View source

#=~(range : RegexLiteral) : BoolLiteral

Similar to String#=~.

View source

#>(other : StringLiteral | MacroId) : BoolLiteral

Similar to String#>

View source

#[](range : RangeLiteral) : StringLiteral

Similar to String#[].

View source

#camelcase(*, lower : BoolLiteral = false) : StringLiteral

Similar to String#camelcase.

View source

#capitalize : StringLiteral

Similar to String#capitalize.

View source

#chomp : StringLiteral

Similar to String#chomp.

View source

#count(other : CharLiteral) : NumberLiteral

Similar to String#count.

View source

#downcase : StringLiteral

Similar to String#downcase.

View source

#empty? : BoolLiteral

Similar to String#empty?.

View source

#ends_with?(other : StringLiteral | CharLiteral) : BoolLiteral

Similar to String#ends_with?.

View source

#gsub(regex : RegexLiteral, replacement : StringLiteral) : StringLiteral

Similar to String#gsub.

View source

#id : MacroId

Returns a MacroId for this string's contents.

View source

#includes?(search : StringLiteral | CharLiteral) : BoolLiteral

Similar to String#includes?.

View source

#size : NumberLiteral

Similar to String#size.

View source

#starts_with?(other : StringLiteral | CharLiteral) : BoolLiteral

Similar to String#starts_with?.

View source

#strip : StringLiteral

Similar to String#strip.

View source

#titleize : StringLiteral

Similar to String#titleize.

View source

#to_i(base = 10)

Similar to String#to_i.

View source

#underscore : StringLiteral

Similar to String#underscore.

View source

#upcase : StringLiteral

Similar to String#upcase.

View source