diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-11-15 18:13:44 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-11-15 18:14:09 -0500 |
| commit | 290c72732f21f1cddb3a0f8ec3213e4ec321da14 (patch) | |
| tree | 7c6c939a8d563edda5afddefcc2810d550ede0f3 /man/man3 | |
| parent | a1884f7a85cbee5a67cf48c9e7b088fdea8b8b38 (diff) | |
Add Path.lines()
Diffstat (limited to 'man/man3')
| -rw-r--r-- | man/man3/tomo-Path.by_line.3 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/man/man3/tomo-Path.by_line.3 b/man/man3/tomo-Path.by_line.3 index ff7a737c..02a75c5a 100644 --- a/man/man3/tomo-Path.by_line.3 +++ b/man/man3/tomo-Path.by_line.3 @@ -2,7 +2,7 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Path.by_line 3 2025-05-17 "Tomo man-pages" +.TH Path.by_line 3 2025-11-15 "Tomo man-pages" .SH NAME Path.by_line \- iterate by line .SH LIBRARY @@ -31,12 +31,12 @@ An iterator that can be used to get lines from a file one at a time or none if t .EX # Safely handle file not being readable: if lines := (./file.txt).by_line() -for line in lines -say(line.upper()) + for line in lines + say(line.upper()) else -say("Couldn't read file!") + say("Couldn't read file!") # Assume the file is readable and error if that's not the case: for line in (/dev/stdin).by_line()! -say(line.upper()) + say(line.upper()) .EE |
