iyi

Standard library, 0.18.0

std/string_pool

Interned strings: the same bytes become the same String object.

import std/string_pool to use it. Source: src/std/string_pool.iyi at v0.18.0.

Bytesalias

std/string_pooliyi doc src/std/string_pool.iyi
pub alias Bytes = Std::Slice::Bytes

StringPoolclass

std/string_pooliyi doc src/std/string_pool.iyi
pub class StringPool
  def capacity : Int32
  def empty? : Bool
  def get(str : Pointer(UInt8), len : Int32) : String
  def get(slice : Bytes) : String
  def get(str : String) : String
  def get?(str : Pointer(UInt8), len : Int32) : String | ::Nil
  def get?(slice : Bytes) : String | ::Nil
  def get?(str : String) : String | ::Nil
  def initialize(initial_capacity : Int32 = 8)
  def rehash : Nil
  def size : Int32
end