Difference between revisions of "String.packsize"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2022.1<br/> '''Class:''' string<br/> === Description === Returns the size in bytes of any string packed with a given description....")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns the size in bytes of any string packed with a given description.
 
Returns the size in bytes of any string packed with a given description.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(string) = string.packsize(format)
 
(string) = string.packsize(format)
</source>
+
</syntaxhighlight>
  
  You can't use '''s''' and '''z''' because they have variable lengths
+
  '''You can't use '''s''' and '''z''' because they have variable lengths'''
  
 
=== Parameters ===
 
=== Parameters ===

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2022.1
Class: string

Description

Returns the size in bytes of any string packed with a given description.

(string) = string.packsize(format)
You can't use s and z because they have variable lengths

Parameters

format: (string) the format used to pack the strings

Return values

Returns (number) the pack size