Re: Find a char in string

2021-07-07 Thread Wim Stockman
I see the troff.org domain name is well a goed candidate to host something like that. Maybe it would also nice to make it Lo Fi in a gopher format and Gemini capsule ? I don't know who maintainers are of the troff.org domain. Maybe we could ask them to collaborate. Kind regards Wim Stockman Op ma

Re: Find a char in string

2021-07-05 Thread John Ankarström
Den 2021-06-23 kl. 21:48 skrev Wim Stockman: > Is there a function in groff to find the position of a char in a string. > So I can split a string into more than one. > I found the substring function that can cut based on length. If I could my > marker in the string I could cut it there. Heirloom t

Re: Find a char in string

2021-07-05 Thread Dave Kemper
On 6/26/21, Wim Stockman wrote: > Maybe the groff maintainers could include these macros to the > manual. Because they contain some nice idiomatic features. These would be great candidates for the groff-examples repository that I keep trying to trick someone into creating and maintaining (http:/

Re: Find a char in string

2021-06-26 Thread Wim Stockman
Hi, I tried out both macros and they work very good. Maybe the groff maintainers could include these macros to the manual. Because they contain some nice idiomatic features. Kind regards Wim Stockman Op do 24 jun. 2021 20:46 schreef Wim Stockman : > Thank you Mr. Wilson. > > I ll read the macro

Re: Find a char in string

2021-06-24 Thread Wim Stockman
Thank you Mr. Wilson. I ll read the macro this weekend and let you know about my thoughts on it. Kind regards Wim Stockman Op do 24 jun. 2021 12:24 schreef Denis M. Wilson : > Macros attached. > > On Wed, 23 Jun 2021 21:26:23 +0100 > "Denis M. Wilson" wrote: > > > I have macros corresponding t

Re: Find a char in string

2021-06-24 Thread Steve Izma
On Thu, Jun 24, 2021 at 11:23:48AM +0100, Denis M. Wilson wrote: > Subject: Re: Find a char in string > > Macros attached. > ... > . if \[str]\*[str-tmp]\[str]\$[3]\[str] \{\ Very useful macros, thanks. But I am astonished that \[str] comes into existence merely by being ca

Re: Find a char in string

2021-06-24 Thread Denis M. Wilson
Macros attached. On Wed, 23 Jun 2021 21:26:23 +0100 "Denis M. Wilson" wrote: > I have macros corresponding to Cs strchr and strrchr functions. > Do you want me to pass them on? > > Denis > > On Wed, 23 Jun 2021 21:48:48 +0200 > Wim Stockman wrote: > > > Is there a function in groff to find t

Re: Find a char in string

2021-06-23 Thread Wim Stockman
Would be great thx. I was already looking at a solution with the .sy macro to invoke an awk oneliner. But I d rather do it all in groff. Kind regards, Wim Stockman Op wo 23 jun. 2021 22:26 schreef Denis M. Wilson : > I have macros corresponding to Cs strchr and strrchr functions. > Do you want m

Re: Find a char in string

2021-06-23 Thread Denis M. Wilson
I have macros corresponding to Cs strchr and strrchr functions. Do you want me to pass them on? Denis On Wed, 23 Jun 2021 21:48:48 +0200 Wim Stockman wrote: > Is there a function in groff to find the position of a char in a > string. So I can split a string into more than one. > I found the sub

Re: Find a char in string

2021-06-23 Thread Steffen Nurpmeso
Wim Stockman wrote in : |Is there a function in groff to find the position of a char in a string. |So I can split a string into more than one. |I found the substring function that can cut based on length. If I could my |marker in the string I could cut it there. Loop over the string and use s

Find a char in string

2021-06-23 Thread Wim Stockman
Is there a function in groff to find the position of a char in a string. So I can split a string into more than one. I found the substring function that can cut based on length. If I could my marker in the string I could cut it there. Kind regards, Wim Stockman