class Macros::StringLiteral

Overview

A string literal.

Superclass hierarchy

Object
Reference
Macros::ASTNode
Macros::StringLiteral

Defined in:

Instance Method Summary

Instance Method Detail

def +(other : StringLiteral | CharLiteral) : StringLiteral

Similar to String#+.


def =~(range : RegexLiteral) : BoolLiteral

Similar to String#=~.


def [](range : RangeLiteral) : StringLiteral

Similar to String#[].


def camelcase : StringLiteral

Similar to String#camelcase.


def capitalize : StringLiteral

Similar to String#capitalize.


def chars : Macros::ArrayLiteral(CharLiteral)

Similar to String#chars.


def chomp : StringLiteral

Similar to String#chomp.


def downcase : StringLiteral

Similar to String#downcase.


def empty? : BoolLiteral

Similar to String#empty?.


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

Similar to String#ends_with?.


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

Similar to String#gsub.


def id : MacroId

Returns a MacroId for this string's contents.


def length : NumberLiteral

Similar to String#length.


def lines : Macros::ArrayLiteral(StringLiteral)

Similar to String#lines.


def split : Macros::ArrayLiteral(StringLiteral)

Similar to String#split.


def split(node : ASTNode) : Macros::ArrayLiteral(StringLiteral)

Similar to String#split.


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

Similar to String#starts_with?.


def strip : StringLiteral

Similar to String#strip.


def to_i(base = 10)

Similar to String#to_i.


def tr(from : StringLiteral, to : StringLiteral) : StringLiteral

Similar to String#tr.


def underscore : StringLiteral

Similar to String#underscore.


def upcase : StringLiteral

Similar to String#upcase.