Home Online Manual
Top
Back: filecmd
Forward: finduni
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.42 find

Syntax:
find ( string_expression, substring_expression )
find ( string_expression, substring_expression, int_expression )
Type:
int
Purpose:
returns the first position of the substring in the string or 0 (if not found),
starts the search at the position given in the 3rd argument.
Example:
 
  find("Aac","a");
==> 2
  find("abab","a"+"b");
==> 1
  find("abab","a"+"b",2);
==> 3
  find("abab","ab",3);
==> 3
  find("0123","abcd");
==> 0
See string.