You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,8 @@ say sha1("foo bar baz"; # C7567E8B39E...
79
79
say stem "foo.tar.gz"; # foo
80
80
say stem "foo.tar.gz", 1; # foo.tar
81
81
82
+
say text-from-url $url, :verbose; # ...
83
+
82
84
dd trailing-whitespace("bar \t"); # " \t "
83
85
84
86
say word-at("foo bar baz", 5); # (4 3 1)
@@ -454,6 +456,17 @@ say stem "foo.tar.gz", *; # foo
454
456
455
457
Return the stem of a string with all of its extensions removed. Optionally accepts a second argument indicating the number of extensions to be removed. This may be `*` (aka `Whatever`) to indicate to remove all extensions.
456
458
459
+
text-from-url
460
+
-------------
461
+
462
+
```raku
463
+
my$text= text-from-url $url, :verbose;
464
+
```
465
+
466
+
Returns the text found at the given URL, or `Nil` if the fetch of the text failed for some reason. Takes an optional `:verbose` named argument: if specified with a trueish value, will show any error output that was received on `STDERR`: defaults to False, to quietly just return `Nil` on error.
467
+
468
+
Assumes the `curl` command-line program is installed and a network connection is available.
0 commit comments