Length: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
No edit summary
imported>StDoodle
mNo edit summary
Line 1: Line 1:
{{#vardefine:name|length}}
{{
{{#vardefine:return_type|int}}
#vardefine:name|length}}{{
#vardefine:return_type|int}}{{


{{FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=String Handling Routines|
function_category=String Handling Routines|
Line 17: Line 18:
function_description=Returns the number of characters (not 0-indexed) in a string. Note that for escaped characters, only the actual character — not the escape marker — is counted.|
function_description=Returns the number of characters (not 0-indexed) in a string. Note that for escaped characters, only the actual character — not the escape marker — is counted.|


needscode=yes|
}}
}}

Revision as of 21:42, 8 March 2010

needs(code_samples);

Function Syntax

int length(string count_me )

  • count_me is the string to check

Returns the number of characters (not 0-indexed) in a string. Note that for escaped characters, only the actual character — not the escape marker — is counted.