strlen
From DavinciWiki
(Difference between revisions)
Line 1: | Line 1: | ||
− | {{DavinciWiki_Function | + | {{DavinciWiki_Function| |
− | [[ | + | Find the length of a string |
+ | | | ||
+ | Arguments: A string or text buffer | ||
+ | |||
+ | Return Value: A 1xNx1 array for N lines of text | ||
+ | | | ||
+ | Syntax: strlen(STRING/TEXT) | ||
+ | |||
+ | strlen() will return the number of characters in a string or the number of characters for each line of a text buffer. In the case of a string strlen() will return a single integer. In the case of a text buffer it will return a 1xNx1 array where N is the number of lines of text. | ||
+ | | | ||
+ | dv> stuff | ||
+ | "This is a sample line of text" | ||
+ | |||
+ | dv> strlen(stuff) | ||
+ | 29 | ||
+ | |||
+ | dv> poem | ||
+ | Text Buffer with 3 lines of text | ||
+ | 1: The sun was shining on the sea, shining with all it's might | ||
+ | 2: He did his very best to make the billows smooth and bright | ||
+ | 3: And this was odd because it was the middle of the night | ||
+ | |||
+ | dv> strlen(poem) | ||
+ | 1x3x1 array of int, bsq format [12 bytes] | ||
+ | 59 | ||
+ | 58 | ||
+ | 55 | ||
+ | | | ||
+ | | | ||
+ | | | ||
+ | *[[strstr]] | ||
+ | *[[strsub]] | ||
+ | | | ||
+ | | | ||
+ | }} | ||
[[category:Functions]] | [[category:Functions]] | ||
+ | [[category:Davinci Core]] | ||
[[category:String Functions]] | [[category:String Functions]] |
Revision as of 19:09, 27 February 2006
Contents: Description, Arguments, Usage, Examples, Related Functions Supported Under Version: >1.69 Current Davinci Version: 2.27 64-bit Safe: No
Description Find the length of a string
Arguments and Return Values Arguments: A string or text buffer Return Value: A 1xNx1 array for N lines of text
Usage Syntax: strlen(STRING/TEXT) strlen() will return the number of characters in a string or the number of characters for each line of a text buffer. In the case of a string strlen() will return a single integer. In the case of a text buffer it will return a 1xNx1 array where N is the number of lines of text.
Examples dv> stuff "This is a sample line of text" dv> strlen(stuff) 29 dv> poem Text Buffer with 3 lines of text 1: The sun was shining on the sea, shining with all it's might 2: He did his very best to make the billows smooth and bright 3: And this was odd because it was the middle of the night dv> strlen(poem) 1x3x1 array of int, bsq format [12 bytes] 59 58 55 |
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Recent Core Changes Modified On: 03-27-2006 |