[PATCH v2] templates: add substring and string length operations

Rodrigo Damazio rdamazio at google.com
Tue Jul 18 17:10:14 EDT 2017


Hold on, I have a newer version I'm finishing which will support slicing
over lists as well, as Yuya suggested.


On Tue, Jul 18, 2017 at 2:01 PM, Kevin Bullock <
kbullock+mercurial at ringworld.org> wrote:

> > On Jul 14, 2017, at 18:42, Rodrigo Damazio Bovendorp via Mercurial-devel
> <mercurial-devel at mercurial-scm.org> wrote:
> >
> > # HG changeset patch
> > # User Rodrigo Damazio Bovendorp <rdamazio at google.com>
> > # Date 1500075683 25200
> > #      Fri Jul 14 16:41:23 2017 -0700
> > # Node ID c4bac4ea7b1ea923d6ba4299cd9c974469b39cb0
> > # Parent  c0d8de2724ce6240d2a4241aff78ce2ee92359c2
> > templates: add substring and string length operations
> >
> > This will allow substr(text, start, end) and strlen(text) in templates,
> > permitting various text formatting, such as making a (non-graphing) log
> line be
> > limited to terminal width ("substr(desc, 0, termwidth)")
>
> Looks straightforward, queued, thanks.
>
> pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
> Kevin R. Bullock
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170718/82a42406/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4847 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170718/82a42406/attachment.bin>


More information about the Mercurial-devel mailing list