Difference between revisions of "String.pack"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2022.1<br/> '''Class:''' string<br/> === Description === Returns a binary string containing the provided arguments. The descripti...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns a binary string containing the provided arguments. The description in the first argument, which must be a string, determines the way the remaining arguments are packed.
 
Returns a binary string containing the provided arguments. The description in the first argument, which must be a string, determines the way the remaining arguments are packed.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(string) = string.pack(format,s1,s2,...)
 
(string) = string.pack(format,s1,s2,...)
 
</source>
 
</source>

Revision as of 15:31, 13 July 2023

Available since: Gideros 2022.1
Class: string

Description

Returns a binary string containing the provided arguments. The description in the first argument, which must be a string, determines the way the remaining arguments are packed. <syntaxhighlight lang="lua"> (string) = string.pack(format,s1,s2,...) </source>

Parameters

format: (string) determines the way the strings are packed
s1: (string) string to pack
s2: (string) string to pack
...: (string) string to pack

Return values

Returns (string) the packed string