Noir
  • πŸšΆβ€β™‚οΈIntro
  • πŸ“Tutorials
    • πŸŽ“Starting Noir
    • πŸ“–Libraries
    • πŸ–₯️Services
    • ❔Libraries VS Services
    • πŸ’¬Callbacks
    • πŸ’₯Classes
    • πŸ”ŽDebugging
  • πŸ“šExamples
  • β˜„οΈAPI Reference
    • Bootstrapper
    • Built-Ins
      • Classes
        • AITarget
        • Body
        • Command
        • Connection
        • Event
        • HTTPRequest
        • HTTPResponse
        • Library
        • Message
        • Object
        • Player
        • Service
        • Task
        • TickIterationProcess
        • Tracker
        • Vehicle
        • Widgets
          • MapLabelWidget
          • MapLineWidget
          • MapObjectWidget
          • PopupWidget
          • ScreenPopupWidget
          • Widget
      • Libraries
        • Base64
        • Dataclasses
        • Deprecation
        • Events
        • HTTP
        • JSON
        • Logging
        • Matrix
        • Number
        • String
        • Table
      • Services
        • CommandService
        • GameSettingsService
        • HTTPService
        • MessageService
        • NotificationService
        • ObjectService
        • PlayerService
        • TaskService
        • TPSService
        • UIService
        • VehicleService
    • Callbacks
    • Class
    • Classes
    • Debugging
    • Definition
    • Libraries
    • Noir
    • Services
    • TypeChecking
Powered by GitBook
On this page
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
  • Parameters
  • Returns
Edit on GitHub
  1. API Reference
  2. Built-Ins
  3. Libraries

Table

Noir.Libraries.Table: NoirLibrary

A library containing helper methods relating to tables.


Noir.Libraries.Table:Length(tbl)

Returns the length of the provided table.

Parameters

  • tbl: table

Returns

  • integer


Noir.Libraries.Table:Random(tbl)

Returns a random value in the provided table.

Parameters

  • tbl: table

Returns

  • any


Noir.Libraries.Table:Keys(tbl)

Return the keys of the provided table.

Parameters

  • tbl: table

Returns

  • tbl


Noir.Libraries.Table:Values(tbl)

Return the values of the provided table.

Parameters

  • tbl: tbl

Returns

  • tbl


Noir.Libraries.Table:Slice(tbl, start, finish)

Get a portion of a table between two points.

Parameters

  • tbl: tbl

  • start: number|nil

  • finish: number|nil

Returns

  • tbl


Noir.Libraries.Table:ToString(tbl, indent)

Converts a table to a string by iterating deep through the table.

Parameters

  • tbl: table

  • indent: integer|nil

Returns

  • string


Noir.Libraries.Table:Copy(tbl)

Copy a table (shallow).

Parameters

  • tbl: tbl

Returns

  • tbl


Noir.Libraries.Table:DeepCopy(tbl)

Copy a table (deep).

Parameters

  • tbl: tbl

Returns

  • tbl


Noir.Libraries.Table:Merge(tbl, other)

Merge two tables together (unforced).

Parameters

  • tbl: table

  • other: table

Returns

  • table


Noir.Libraries.Table:ForceMerge(tbl, other)

Merge two tables together (forced).

Parameters

  • tbl: table

  • other: table

Returns

  • table


Noir.Libraries.Table:Find(tbl, value)

Find a value in a table. Returns the index, or nil if not found.

Parameters

  • tbl: table

  • value: any

Returns

  • any|nil


Noir.Libraries.Table:FindDeep(tbl, value)

Find a value in a table. Unlike :Find(), this method will recursively search through nested tables to find the value.

Parameters

  • tbl: table

  • value: any

Returns

  • any|nil,: table|nil

PreviousStringNextServices

Last updated 7 months ago

β˜„οΈ