From 309e85b6e3bd616984868bd1d7405c497654f2ba Mon Sep 17 00:00:00 2001 From: Travis CI <> Date: Thu, 8 Apr 2021 01:41:04 +0000 Subject: [PATCH] Deploy to GitHub Pages: --- getting-started.html | 5 +++-- modules/core/string.html | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/getting-started.html b/getting-started.html index abeba35e..a2948db1 100644 --- a/getting-started.html +++ b/getting-started.html @@ -157,8 +157,9 @@ Since it has no dependencies this is simple, all the code in src/ c

’amalgamated’ build
If you want an even simpler way, there’s an ‘amalgamated’ build (often called blob, or unity builds.). This is all of the wren source code in one file.

-

This file can be generated by running python3 util/generate_amalgamation.py, and the generated output will be in build/wren.c. -Include build/wren.c and src/include/wren.h in your project code and you’re good to go. +

This file can be generated by running python3 util/generate_amalgamation.py > build/wren.c, +which saves the generated output in build/wren.c.

+

Include build/wren.c and src/include/wren.h in your project code and you’re good to go. Ideally later we can automate generating this and include it in the repo.


If you run into bugs, or have ideas or questions, any of diff --git a/modules/core/string.html b/modules/core/string.html index 9f5d2c9a..0f58ea01 100644 --- a/modules/core/string.html +++ b/modules/core/string.html @@ -121,6 +121,14 @@ var hPosition = metalBand.indexOf("h") System.print(metalBand[hPosition]) //> h +

A string can also be indexed with a Range, which will return a +new string as a substring of the original.

+
+var example = "hello wren"
+System.print(example[0...5])   //> hello
+System.print(example[-4..-1])  //> wren
+
+

If you want to work with a string as a sequence numeric code points, call the codePoints getter. It returns a Sequence that decodes UTF-8 and iterates over the code points, returning each as a number.