Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FuzzyList

With a Fuzzy List, you can implement a fuzzy searching algorithm. The list stores all the items that can be searched for. With the search method you can then execute the actual fuzzy search which returns a list of all the elements found. This can be used to implement searching in a list of games.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • This constructor is an implementation detail. Do not use this.

    Parameters

    • ptr: number

    Returns FuzzyList

Properties

ptr

ptr: number

Methods

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

push

  • push(text: string): void
  • Adds a new element to the list.

    Parameters

    • text: string

    Returns void

search

  • search(pattern: string, max: number): any
  • Searches for the pattern provided in the list. A list of all the matching elements is returned. The returned list has a maximum amount of elements provided to this method.

    Parameters

    • pattern: string
    • max: number

    Returns any

with

  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    Returns T

Static new

  • Creates a new Fuzzy List.

    Returns FuzzyList

Generated using TypeDoc