def strip

bend-kit-webhooks@0.11.0.1 · webhooks.bend:50

import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks
import Base

50# s after the prefix p, or None.
51def strip(+p: String, +s: String) -> Maybe<&2, String>:
52  Bool.pick(Maybe<&2, String>, String.starts_with(s, p), Some{String.drop(s, String.length(p))}, None{})

Uses (6)

Used by (3)