query
On this page

toString

lib.toString

Primop
Docs pulled from | This Revision | 35 minutes ago

Takes 1 arguments

e


Convert the expression e to a string. e can be:

  • A string (in which case the string is returned unmodified).

  • A path (e.g., toString /foo/bar yields "/foo/bar".

  • A set containing { __toString = self: ...; } or { outPath = ...; }.

  • An integer.

  • A list, in which case the string representations of its elements are joined with spaces.

  • A Boolean (false yields "", true yields "1").

  • null, which yields the empty string.


Noogle detected

Aliases

Detected Type
toString :: a -> String

Implementation

This function is implemented in c++ and is part of the native nix runtime.