atdiff( ) Function

Description:
  The atdiff() function returns the offset where cStr1 and cStr2 differ. If they are identical, 0 is returned. The comparison is case sensitive.  

Syntax:
  retval = atdiff ( cStr1, cStr2 )

Parameters:
  string: cStr1 String to search for.
  string: cStr2 String to search in.
  numeric: retval The offset where the strings differ or 0 if they are identical.

Platforms:
  Windows, DOS, Internet Active Pages



Example:

	local var1, var2, retval     				// Variables
	var1 = "abcdef"						// Search String 1								
	var2 = prompt( "Type this String abcDef", "", 10 )	// Obtain Input Data
	retval = atdiff( var1, var2 )				// The difference in the 
								// string should be at the "D"
								// The Returned value will be 4 
	println( retval )					// Print results to screen

  

(c) 2000-2001 by West Coast Web Adventures, Inc., All Rights Reserved