class Crystal::Macros::StringLiteral

Overview

A string literal.

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance methods inherited from class Crystal::Macros::ASTNode

!=(other : ASTNode) : BoolLiteral !=, ==(other : ASTNode) : BoolLiteral ==, class_name : StringLiteral class_name, column_number : StringLiteral | NilLiteral column_number, doc : StringLiteral doc, doc_comment : MacroId doc_comment, end_column_number : StringLiteral | NilLiteral end_column_number, end_line_number : StringLiteral | NilLiteral end_line_number, filename : StringLiteral | NilLiteral filename, id : MacroId id, is_a?(type : TypeNode) : BoolLiteral is_a?, line_number : StringLiteral | NilLiteral line_number, nil? : BoolLiteral nil?, raise(message) : NoReturn raise, stringify : StringLiteral stringify, symbolize : SymbolLiteral symbolize, warning(message : StringLiteral) : NilLiteral warning

Instance Method Detail

Similar to String#+.


[View source]
def <(other : StringLiteral | MacroId) : BoolLiteral #

Similar to String#<


[View source]
def =~(range : RegexLiteral) : BoolLiteral #

Similar to String#=~.


[View source]
def >(other : StringLiteral | MacroId) : BoolLiteral #

Similar to String#>


[View source]
def [](range : RangeLiteral) : StringLiteral #

Similar to String#[].


[View source]
def camelcase(*, lower : BoolLiteral = false) : StringLiteral #

Similar to String#camelcase.


[View source]
def capitalize : StringLiteral #

Similar to String#capitalize.


[View source]
def chars : ArrayLiteral(CharLiteral) #

Similar to String#chars.


[View source]
def chomp : StringLiteral #

Similar to String#chomp.


[View source]
def count(other : CharLiteral) : NumberLiteral #

Similar to String#count.


[View source]
def downcase : StringLiteral #

Similar to String#downcase.


[View source]
def empty? : BoolLiteral #

Similar to String#empty?.


[View source]
def ends_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#ends_with?.


[View source]
def gsub(regex : RegexLiteral, replacement : StringLiteral) : StringLiteral #

Similar to String#gsub.


[View source]
def id : MacroId #

Returns a MacroId for this string's contents.


[View source]
def includes?(search : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#includes?.


[View source]

Similar to String#lines.


[View source]
def size : NumberLiteral #

Similar to String#size.


[View source]
def split(node : ASTNode) : ArrayLiteral(StringLiteral) #

Similar to String#split.


[View source]

Similar to String#split.


[View source]
def starts_with?(other : StringLiteral | CharLiteral) : BoolLiteral #

Similar to String#starts_with?.


[View source]
def strip : StringLiteral #

Similar to String#strip.


[View source]
def titleize : StringLiteral #

Similar to String#titleize.


[View source]
def to_i(base = 10) #

Similar to String#to_i.


[View source]
def tr(from : StringLiteral, to : StringLiteral) : StringLiteral #

Similar to String#tr.


[View source]
def underscore : StringLiteral #

Similar to String#underscore.


[View source]
def upcase : StringLiteral #

Similar to String#upcase.


[View source]