HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • string.split
  • string.gather
  1. Resources
  2. HRLib
  3. Modules
  4. string

Shared

string.split

Function to split text by delimiter

function HRLib.string.split(
    text: string,
    delimiter: string,
    returnAllAs: 'string'|'number'?,
    isArray: boolean?
): ...|string[]|number[]

Parameters description

  • text - the text to split

  • delimiter - the delimiter

  • returnAllAs - sets what to return the values as (if you choose 'number' and one or more of the values can't be number, it will return the string version, if nil, it will be the default, to return as string)

  • isArray - sets whether or not the return value must be multiple values of the splitted string or an array full of the splitted parts

string.gather

Function to combine multiple strings into one with delimiter

function HRLib.string.gather(source: string[], delimiter: string?): string? result

Parameters description

  • source - list of strings to combine

  • delimiter - the delimiter between the strings in the main one

Return description

  • result - the combined string or nil if there's no source

PreviousstringNexttable

Last updated 1 month ago

📚