type.string.build
0.000001

Builds a new string.

Arguments
no defined arguments
Return Value
The given input coerced to a string, or an empty string if no input is given.
something went wrong :(
Building and using a string
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
composition = client.type.string >> client.type.string.append(
  "hello"
)

composition.call
let composition = client.type.string.compose(
  client.type.string.append(
    "hello"
  )
);

composition.call();
curl "https://proc.run/core/exec" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/vnd.proc+json" \
--header "accept: text/plain" \
--data '[["$$", "proc", ["{}", ["()", "type.string"], ["()", "type.string.append", [">>", ["%%", "hello"]]]]]]'
 

hello

Like all value builders type.string.build is callable through the root type.string proc.


Stuck? Want to chat about an idea? Join the community on Discord.