Thanks Dick, this would definitely work - and I’m iterating through characters 
and lines anyway as I attempt to prettify a long data string for eased human 
readability. 
I was just keen to understand why offset wasn’t happy with the ‘not(tab)’ in 
this instance.
Best,
Keith   

> On 21 Jan 2021, at 10:25, Dick Kriesel via use-livecode 
> <[email protected]> wrote:
> 
> 
>> On Jan 21, 2021, at 1:30 AM, Keith Clarke via use-livecode 
>> <[email protected] <mailto:[email protected]>> wrote:
>> 
>> Please can anyone advise on the correct syntax for trying to find the first 
>> non-tab character offset in a string
> 
> Hi, Keith.  You could test each character until you find a tab:
> 
> function offsetOfNotTab pString
> local i
> repeat for each char tChar in pString
>    add 1 to i
>    if tChar <> tab then return i
> end repeat
> end offsetOfNotTab
> 
> — Dick
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to