[Nix-dev] use builtins.readFile and strip trailing newline

4levels 4levels at gmail.com
Thu Jun 9 16:35:07 CEST 2016


Hi Vladimir,

I was just reading strings.nix, removeSuffix seems indeed the best
candidate, thanks for confirming this!

Kind regards,

Erik aka 4levels

On Thu, Jun 9, 2016 at 4:32 PM Vladimír Čunát <vcunat at gmail.com> wrote:

> On 06/09/2016 04:24 PM, 4levels wrote:
> > 'd like to know if there's an easy way to strip off the trailing newline
> > from a file read with builtins.readFile.
>
> lib.removeSuffix "\n"
>
> --Vladimir
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160609/808545ae/attachment.html>


More information about the nix-dev mailing list