query
On this page

mkString

lib.gvariant.mkString

Docs pulled from | This Revision | 34 minutes ago


Returns the GVariant string from the given Nix string value.

Inputs

v

1. Function argument

Type

mkString :: String -> gvariant

Noogle detected

Implementation

The following is the current implementation of this function.

mkString =
    v:
    let
      sanitize = s: replaceStrings [ "\n" ] [ "\\n" ] (escape [ "'" "\\" ] s);
    in
    mkPrimitive type.string v
    // {
      __toString = self: "'${sanitize self.value}'";
    };