strstr

From DavinciWiki
Jump to: navigation, search


Description

Locate and return index of first occurrence of the substring

Arguments and Return Values

Arguments: A string to search in and a string to search for

Return Value: 1xNx1 array of positions in the string

Usage

Syntax: strstr(obj = STRING/TEXT, pattern = STRING)

strstr() returns the index value where pattern begins in obj or 0 if pattern is not in obj. For a TEXT object a VAL is returned whose size is [1,Row,1] where Row is the number of rows in the given text object.

Examples

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> strstr(poem,"billows")
1x3x1 array of int, bsq format [12 bytes]
0
34
0

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 03-27-2006

Personal tools