Skip to content

_strloc

bergsma edited this page Sep 26, 2014 · 3 revisions

strloc

Locate a substring in a string

Syntax

offset = strloc ( string,substring ) ;

Arguments

  1. str string

The haystack.

  1. str substring

The needle.

Return Value

int offset
  • 0-n : The offset in string where the substring was located, otherwise the length of the string is returned.

The STATUS variable is set to $ACKNOWLEDGE

Exceptions

  • %ARGUMENT: Invalid arguments. Usage: offset = strloc ( string,substring ) ;

Description

  • None

Examples

puts "Create an example for the function 'strloc'" ;

Related Links

None

Clone this wiki locally