From e903e6446139c827304052a817f9ff805065be47 Mon Sep 17 00:00:00 2001 From: flaviut Date: Fri, 20 Jun 2014 19:02:35 -0400 Subject: [PATCH] reorganize and elaborate on unicode --- content/arrays.md | 0 content/bitsets.md | 0 content/{types => }/primitives.md | 0 content/seqs.md | 0 .../primitive_data_structures.md => strings.md} | 14 ++++++-------- content/toc.md | 7 +++++-- 6 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 content/arrays.md create mode 100644 content/bitsets.md rename content/{types => }/primitives.md (100%) create mode 100644 content/seqs.md rename content/{types/primitive_data_structures.md => strings.md} (75%) diff --git a/content/arrays.md b/content/arrays.md new file mode 100644 index 0000000..e69de29 diff --git a/content/bitsets.md b/content/bitsets.md new file mode 100644 index 0000000..e69de29 diff --git a/content/types/primitives.md b/content/primitives.md similarity index 100% rename from content/types/primitives.md rename to content/primitives.md diff --git a/content/seqs.md b/content/seqs.md new file mode 100644 index 0000000..e69de29 diff --git a/content/types/primitive_data_structures.md b/content/strings.md similarity index 75% rename from content/types/primitive_data_structures.md rename to content/strings.md index f7f40c0..506172e 100644 --- a/content/types/primitive_data_structures.md +++ b/content/strings.md @@ -1,11 +1,7 @@ --- -title: Primitive Data Structures +title: Strings --- -# Primitive Data Structures - -Nimrod contains several basic builtin data structures: sequences, strings, bitsets, and arrays. - -## Strings +# Strings ``` nimrod echo "words words words ⚑" @@ -43,5 +39,7 @@ There are several types of strings literals: - Raw Strings: created by prefixing the string with an `r`. There are no escape sequences don't work, except for `"`, which can be escaped as `""` - Proc Strings: raw strings, but the method name that prefixes the string is called -### A note about unicode -Unicode symbols are allowed in strings, but are not treated in any special way, so if you want count glyphs or uppercase unicode symbols, you must use the `unicode` module. \ No newline at end of file +## A note about unicode +Unicode symbols are allowed in strings, but are not treated in any special way, so if you want count glyphs or uppercase unicode symbols, you must use the `unicode` module. + +Strings are generally considered to be encoded as UTF-8, so because of unicode's backwards compatibility, can be treated exactly as ASCII, with all values above 127 ignored. \ No newline at end of file diff --git a/content/toc.md b/content/toc.md index 9b5d7e4..384e014 100644 --- a/content/toc.md +++ b/content/toc.md @@ -8,12 +8,15 @@ * [If, Else, While, Block](/if_else_while/) * [Case Statements](/case/) * [For Loops & Iterators](/for_iterators/) +* [Primitive Types](/primitives/) * [Types](/types/) * [Object Types](/types/objects/) * [Enum Types](/types/enums/) * [Distinct Types](/types/distinct/) - * [Primitive Types](/types/primitives/) - * [Primitive Data Structures](/types/primitive_data_structures/) +* [Strings](/strings/) +* [Arrays](/arrays/) +* [Sequences](/seqs/) +* [Bitsets](/bitsets/) * [Procedures](/procs/) * [Exceptions](/exceptions/) * [Varargs](/varargs/)