mumu 0.10.0

Lava Mumu is a language for those in the now and that know
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "id": "fn-string-replace",
  "dataComponent": "string",
  "heading": {
    "title": "replace",
    "badges": ["String", "PARTIAL"]
  },
  "synopsis": "Replaces all occurrences of a substring with another substring. Partial/placeholder usage supported.",
  "codeBlocks": [
    "extend(\"string\")\n\nsput( string:replace(\"l\", \"X\", \"hello\") )\n# => \"heXXo\"\n\n# Partial usage:\nrepL = string:replace(\"l\")\nsput( repL(\"*\")(\"hello\") )\n# => \"he**o\"\n\n# Placeholder:\np = string:replace(_, \"o\", \"foo,boo\")\nsput( p(\",\") )\n# => \"foo boo\""
  ],
  "notes": [
    "Arguments: search string, replacement string, input string.",
    "Returns a new string.",
    "Partial application and _ placeholders supported.",
    "If not all are strings, raises an error."
  ]
}