Family Day update

This commit is contained in:
Ingy döt Net 2020-02-17 23:21:07 -08:00
parent aac6731f2c
commit 9ad63ea473
2442 changed files with 39761 additions and 8255 deletions

View file

@ -1 +1,2 @@
$haystack.match($needle, :g)».from; # List of all positions where $needle appears in $haystack
$haystack.indices($needle :overlap); # Also find any overlapping instances of $needle in $haystack

View file

@ -0,0 +1,14 @@
void main() {
var text = "一二三四五六七八九十";
var starts = "一二";
var ends = "九十";
var contains = "五六";
var not_contain = "";
stdout.printf(@"text: $text\n\n", );
stdout.printf(@"starts with $starts: $(text.has_prefix(starts))\n");
stdout.printf(@"ends with $ends: $(text.has_suffix(ends))\n");
stdout.printf(@"starts with $starts: $(text.has_suffix(starts))\n");
stdout.printf(@"contains $contains: $(contains in text)\n");
stdout.printf(@"contains $not_contain: $(contains in text)\n");
}