From 107a4a1b9e6b3096e96b70ede32c8d5091f90430 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 10 Feb 2021 15:59:03 +0800 Subject: [PATCH] update to 3.0 --- README.md | 4 ++-- docs/{lib2x-split_str.md => lib3x-split_str.md} | 2 +- docs/{lib2x-sub_str.md => lib3x-sub_str.md} | 4 ++-- src/util/split_str.scad | 2 +- src/util/sub_str.scad | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename docs/{lib2x-split_str.md => lib3x-split_str.md} (78%) rename docs/{lib2x-sub_str.md => lib3x-sub_str.md} (80%) diff --git a/README.md b/README.md index 0d5e6dbe..ca6ec904 100644 --- a/README.md +++ b/README.md @@ -147,8 +147,8 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp - [util/slice](https://openhome.cc/eGossip/OpenSCAD/lib3x-slice.html) - [util/some](https://openhome.cc/eGossip/OpenSCAD/lib3x-some.html) - [util/sort](https://openhome.cc/eGossip/OpenSCAD/lib3x-sort.html) -- [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-sub_str.html) -- [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib2x-split_str.html) +- [util/sub_str](https://openhome.cc/eGossip/OpenSCAD/lib3x-sub_str.html) +- [util/split_str](https://openhome.cc/eGossip/OpenSCAD/lib3x-split_str.html) - [util/sum](https://openhome.cc/eGossip/OpenSCAD/lib2x-sum.html) - [util/zip](https://openhome.cc/eGossip/OpenSCAD/lib2x-zip.html) diff --git a/docs/lib2x-split_str.md b/docs/lib3x-split_str.md similarity index 78% rename from docs/lib2x-split_str.md rename to docs/lib3x-split_str.md index e9d9073e..6768a15e 100644 --- a/docs/lib2x-split_str.md +++ b/docs/lib3x-split_str.md @@ -13,5 +13,5 @@ Splits the given string around matches of the given delimiting character. use ; - echo(split_str("hello,world", ",")); // ECHO: ["hello", "world"] + assert(split_str("hello,world", ",") == ["hello", "world"]); diff --git a/docs/lib2x-sub_str.md b/docs/lib3x-sub_str.md similarity index 80% rename from docs/lib2x-sub_str.md rename to docs/lib3x-sub_str.md index c7b95f3a..8caac44e 100644 --- a/docs/lib2x-sub_str.md +++ b/docs/lib3x-sub_str.md @@ -14,5 +14,5 @@ Returns the part of the string from `begin` to `end`, or to the `end` of the str use ; - echo(sub_str("helloworld", 0, 5)); // ECHO: "hello" - echo(sub_str("helloworld", 5)); // ECHO: "world" + assert(sub_str("helloworld", 0, 5) == "hello"); + assert(sub_str("helloworld", 5) == "world"); \ No newline at end of file diff --git a/src/util/split_str.scad b/src/util/split_str.scad index d785159b..5fec1e1d 100644 --- a/src/util/split_str.scad +++ b/src/util/split_str.scad @@ -4,7 +4,7 @@ * @copyright Justin Lin, 2017 * @license https://opensource.org/licenses/lgpl-3.0.html * -* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-split_str.html +* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-split_str.html * **/ diff --git a/src/util/sub_str.scad b/src/util/sub_str.scad index 92d87a41..3d93070d 100644 --- a/src/util/sub_str.scad +++ b/src/util/sub_str.scad @@ -4,7 +4,7 @@ * @copyright Justin Lin, 2017 * @license https://opensource.org/licenses/lgpl-3.0.html * -* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-sub_str.html +* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-sub_str.html * **/