[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find a char in string

From: Steffen Nurpmeso
Subject: Re: Find a char in string
Date: Wed, 23 Jun 2021 22:19:05 +0200
User-agent: s-nail v14.9.22-158-g1c350313ff

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 substring to shorten it by one in
each iteration?  Then use normal comparison for the spliced thing.

|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]