type.string.chomp
0.000001

Removes characters from a string.

Arguments
value
If passed, only characters matching value are removed.
Return Value
The string with the last character removed, or characters matching value if given.
something went wrong :(
Removing the last character from a string
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.type.string.chomp.call(
  "foo"
)
client.type.string.chomp.call(
  "foo"
);
curl "https://proc.run/type/string/chomp" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/json" \
--data '"foo"'
 

fo

something went wrong :(
Removing multiple characters from the end of a string
Setup
authorization=PROCAUTH
require "proc"

client = Proc.connect("PROCAUTH")
const Proc = require("@proc.dev/client");
const client = Proc.connect("PROCAUTH");
client.type.string.chomp.call(
  "foo", value: "oo"
)
client.type.string.chomp.call(
  "foo", {value: "oo"}
);
curl "https://proc.run/type/string/chomp?value=oo" --silent \
--header "authorization: bearer $authorization" \
--header "content-type: application/json" \
--data '"foo"'
 

f


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