struct Novika::Quote::GraphemeQuote
  
  - Novika::Quote::GraphemeQuote
 - Struct
 - Value
 - Object
 
Overview
Quote type for a single grapheme (perceived character).
Included Modules
Defined in:
novika/forms/quote.crConstructors
Class Method Summary
Instance Method Summary
- 
        #==(other : Quote) : Bool
        
          
Returns whether this quote variant consists of the same graphemes as other.
 - #as_byte?
 - 
        #at(b : Int32, e : Int32) : Quote
        
          
Returns a subquote from b to e.
 - 
        #at?(index : Int32) : GraphemeQuote | Nil
        
          
Returns the grapheme at index as
Quote, or nil. - 
        #cached_count? : Int32 | Nil
        
          
Returns the cached count of graphemes in this quote variant.
 - 
        #count : Int32
        
          
Returns the amount of graphemes in this quote variant.
 - #each_occurrence_of(pattern : GraphemeQuote, &)
 - #each_occurrence_of(pattern : StringQuote, &)
 - 
        #empty? : Bool
        
          
Returns whether this quote is empty.
 - #fit(total : Int, ellipsis : Quote) : Quote
 - 
        #grapheme : String::Grapheme
        
          
Returns the grapheme.
 - #pad(total : Int, padder : GraphemeQuote, side : PadSide) : Quote
 - #pad(total : Int, padder : StringQuote, side : PadSide) : Quote
 - 
        #replace_all(pattern : Quote, repl : Quote) : Quote
        
          
Replaces instances of pattern with repl.
 - #stitch(other : StringQuote) : Quote
 - 
        #string : String
        
          
Converts this quote variant to
String. - #to_s(io)
 
Instance methods inherited from module Novika::Quote
  
  
    
      ==(other : Quote) : Bool
    ==, 
    
  
    
      at(b : Int32, e : Int32) : Quoteat(index : Int32) : GraphemeQuote at, at?(index : Int32) : GraphemeQuote | Nil at?, cached_count? : Int32 | Nil cached_count?, count : Int32 count, desc(io : IO) desc, each_occurrence_of(pattern : Form, &) each_occurrence_of, effect(io) effect, empty? : Bool empty?, first_byte? : UInt8 | Nil first_byte?, fit(total : Int, ellipsis : _) : Quote fit, ord? : Int32 | Nil ord?, pad(total : Int, padder : _, side : PadSide) : Quote pad, replace_all(pattern : Quote, repl : Quote) : Quote replace_all, slice_at(slicept : Int32) : Tuple(Quote, Quote) slice_at, slice_at?(slicept : Int32) : Tuple(Quote, Quote) | Nil slice_at?, stitch(other : Quote) : Quote stitch, string : String string, to_byteslice to_byteslice, to_quote : Quote to_quote
Constructor methods inherited from module Novika::Quote
  
  
    
      new(string : String, count = string.grapheme_size, ascii = string.ascii_only?)new(grapheme : String::Grapheme)
new(char : Char) new
Class methods inherited from module Novika::Quote
  
  
    
      typedesc
    typedesc
    
  
    
  
    
  Instance methods inherited from module Novika::Form
  
  
    
      a(type : T.class) : T forall T
    a, 
    
  
    
      desc(io : IO)desc : String desc, die(details : String) die, effect(io)
effect effect, on_open(engine : Engine) : self on_open, on_parent_open(engine : Engine) : self on_parent_open, onto(block : Block) : self onto, sel(a, b) sel, to_quote : Quote to_quote
Instance methods inherited from module Novika::Schedulable
  
  
    
      schedule(engine : Engine, stack : Block)
    schedule, 
    
  
    
      schedule!(engine : Engine, stack : Block)
    schedule!
    
  
    
    
    
  
    
    
    
    
  
    
    
    
    
  
    
    
    
    
  
Constructor Detail
Class Method Detail
Instance Method Detail
Returns whether this quote variant consists of the same graphemes as other.
Returns a subquote from b to e. Clamps b and e to bounds of this quote. Returns an empty quote if this quote is empty without regarding b and e.
Both ends are inclusive.
Returns the grapheme at index as Quote, or nil.
Returns the cached count of graphemes in this quote variant. Returns nil if there is no cached count.
Grapheme quotes always return 1.
Returns the amount of graphemes in this quote variant.
Grapheme quotes always return 1.
Replaces instances of pattern with repl. Returns the resulting quote.