index

Varkon MBS Programmers manual

# finds - Function

## Description

Searces a string for the occurence of another string and returns the location.

## Syntax

      pos:=finds(s1, s2);

      int    pos;
      string s1;
      string s2;

## Principal parameters

s1 | - The string to search in.
s2 | - The string to search for.

## Optional parameters

None.

## Return value

An INT value equal to the start position of s2 in s1. A value of zero is returned if s2 is not found in s1.

## Examples

      pos:=finds("ABCDE","CD");  ! Equal to pos:=3;

      pos:=finds("ABCDE","P");   ! Equal to pos:=0;

Varkon version 1.19C svn# 120