|Author||Topic: Looking for a couple of functions|
|Al Wimberly||Looking for a couple of functions|
on Sun, 18 Apr 2010 11:44:23 -0400
Has anyone written, using ToolsIII functions, a function that would replace the Funcky 60 one below? I am also looking for the similar SwapToken function. I'm simply lazy and didn't want to write this if someone else had already done so and was willing to share it. Thanks ======================================= Usage: matchtoken(str, delims, matchstr, start, case) -> nOccur Params: string str - A character string to process. string delims - A character string containing the delimiter characters that separate each token. string matchstr - A character string containing the sequence of characters to match. int start - An integer denoting the starting token to begin matching. logical case - A logical denoting the case sensitivity where FALSE == no sensitivity and TRUE == case sensitive. Returns: An integer denoting the ordinal token number that matches the character string specified by <matchstr> or 0 if no tokens matched. Description: matchtoken() can be used to compare all the tokens contained in <str> with the character string specified via <matchstr>. The ordinal token position of the first token that matches <matchstr> is returned. It is useful to scan a string for matching tokens that will be substituted with a new token using swaptoken(). If no tokens are found that match the character string specified via <matchstr> or the <start> parameter is greater than the number of tokens contained in <str> then 0 is returned. If <start> is not specified or is specified as DEFAULT the comparisons begin with the first token contained in <str>, otherwise the comparisons begin with the token specified via <start>. When <start> is specified, the true ordinal token position of the matching token is returned based upon its position from the start of <str> and not from the position defined by <start>. ie: If <start> is specified as 4, and the fifth physical token in <str> matches, matchtoken() will return 5 which is the true ordinal token position of the match even though the match occurred with the second token that was compared. If <case> is specified as TRUE, then the comparisons will be case sensitive. If FALSE, the comparisons will not be case sensitive. If <case> is left off the default is TRUE. Tokens are words separated by delimiter characters such as spaces, tabs, parenthesis, commas, periods etc. The delimiter characters can be specified via the parameter <delims> as a null terminated character string.
|AUGE_OHR||Re: Looking for a couple of functions|
on Mon, 11 Apr 2011 23:39:30 +0200
hi, > the Funcky 60 one below? hm ... did you look at http://www.funcky.com/Start.Asp there is a Xbase++ Version *** snip *** FUNCky supports Xbase++ using Native XBase++ Classes generated by JazzAge CE. The generated classes allows Xbase++ to take full advantage of all the COM Objects found in FUNCky using familiar Xbase++ Syntax. Incorporating FUNCky into your Xbase++ applications is a snap - simply include a header file for the component you want to use and call that Component's New() Method to create it, its that easy *** eof *** greetings by OHR Jimmy