[Top][All Lists]

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

Re: [Groff] Question about .substring

From: Ingo Schwarze
Subject: Re: [Groff] Question about .substring
Date: Wed, 19 Nov 2014 17:58:03 +0100
User-agent: Mutt/1.5.21 (2010-09-15)


Tadziu Hoffmann wrote on Wed, Nov 19, 2014 at 05:20:54PM +0100:
> Steffen Nurpmeso wrote:

>> Hello: this is a bug?
> [snip]

> Where do you see a bug?
> man 7 groff:
>   .substring xx n1 n2
>     Replace the string named xx with the substring defined by
>     the indices n1 and n2.

The wording could be improved.  As it stands, it is not clear
whether the character at index n2 is the last character included
or the first character not included.


  Replace the string named xx with its substring beginning with
  the zero-based index n1 and ending with index n2, inclusively.

> groff:
>     .ds x abc
>     .substring x 0 1
>     .tm \*x
> --> ab
>     .ds x abc
>     .substring x 0 0
>     .tm \*x
> --> a

reply via email to

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