Difference between revisions of "String type"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>string type</c> returns a map that represents the string datatype in MiniScript's core type system. See also: number, list, map, funcRef === Arguments ===...")
 
(deleted bogus section)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<c>string type</c> returns a map that represents the string datatype in
+
<c>string</c> returns a map that represents the string datatype in
 
MiniScript's core type system.
 
MiniScript's core type system.
  
 
See also: [[number]], [[list]], [[map]], [[funcRef]]
 
See also: [[number]], [[list]], [[map]], [[funcRef]]
  
=== Arguments ===
+
=== Usage Notes ===
 +
<c>string</c> can be used with [[isa]] to check whether a variable refers to a string.  You can also assign new methods here to make them available to all strings.
  
{| class="wikitable"
+
== Example ==
|-
 
! Parameter Name !! Default Value !! Meaning
 
|-
 
| ''paramnamd1'' || type || description
 
|}
 
  
=== Usage Notes ===
+
<ms>"Hello" isa string // returns 1</ms>
<c>string type</c> can be used with [[isa]] to check whether a variable refers to a string.  You can also assign new methods here to make them available to all strings.
 
  
== Example ==
+
== See also ==
  
<ms>"Hello" is a string // returns 1</ms>
+
* The [[Isa | isa ("is a") operator]]
  
 
[[Category:Intrinsic Functions]]
 
[[Category:Intrinsic Functions]]

Latest revision as of 17:14, 5 December 2021

string returns a map that represents the string datatype in MiniScript's core type system.

See also: number, list, map, funcRef

Usage Notes

string can be used with isa to check whether a variable refers to a string. You can also assign new methods here to make them available to all strings.

Example

"Hello" isa string		// returns 1

See also