Harbour Reference Guide

 

GT_STRDIFF()

Return a string where it begins to differ from another

Syntax

GT_StrDiff(<cStr1>, <cStr2>) --> cRet

Arguments

<cStr1> - A character string to compare <cStr2> - The string to compare with

Returns

<cRet> - A string beginning at the position in <cStr2> where <cStr1> begins to differ from <cStr1>

Description

Return a string beginning at the position in <cStr2> where <cStr1> begins to differ from <cStr1>. If the two strings are identical (or identical upto the last character in <cStr2>) the function will return "".

NOTE: invalid parameters will return ""
Examples
      ? gt_strDiff("the cat", "the rat")          // prints "rat"
      ? gt_strDiff("the cat", "the ")             // prints ""
Status

Ready

Files

Library is libgt

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30