Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>return a string where it begins to differ from another</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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 ""


 Source: STRDIFF.C

 Author:  Andy M Leighton

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson