get-string-all(3scm)
get-string-all π β¨
okay so bestie, welcome to the Scheme Programmer's Manual page for get-string-all(3scm) β section 3scm, obviously. she reads characters up to the next end of file and honestly? iconic. π«Ά
β¨ NAME β¨
get-string-all β read characters up to the next end of file.
π LIBRARY π
(import (rnrs)) ;R6RS
(import (rnrs io ports)) ;R6RS
π οΈ SYNOPSIS π οΈ
(get-string-all textual-input-port)
π DESCRIPTION π
Reads from textual-input-port until an end of file, decoding characters in the same manner as get-string-n(3scm) and get-string-n!(3scm).
If characters are available before the end of file, a string containing all the characters decoded from that data are returned. If no character precedes the end of file, the end-of-file object is returned.
π RETURN VALUES π
Returns a single value; a string or the end-of-file object. that's it, that's the vibe check. π«
π EXAMPLES π
(call-with-port (open-input-file "/etc/hostname")
(lambda (p)
(get-string-all p)))
=> "darkstar0
π§ COMPATIBILITY π§
This procedure is only present in R6RS. no cap, bestie. π
π ERRORS π
This procedure can raise exceptions with the following condition types:
&assertion(R6RS) β the wrong number of arguments was passed or an argument was outside its domain. In particular,textual-input-portmust be an open textual input port.&i/o-read(R6RS) β a read error occurred during an I/O operation.&i/o-decoding(R6RS) β thetextual-input-portis associated with a transcoder in theβ΅raiseerror handling mode and a invalid byte sequence was encountered.
bestie, those decoding errors are giving "we tried to read the vibe and the bytes said absolutely not." π handle with care.
π SEE ALSO π
get-string-n(3scm), get-string-n!(3scm), get-bytevector-all(3scm)
π STANDARDS π
R6RS
π¦ HISTORY π¦
This procedure first appeared in R6RS as part of the reworked I/O system.
π AUTHORS π
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://github.com/schemedoc/manpages/.
mwah π this was the get-string-all(3scm) page, dated 2023-07-23 β source/version noted, periodt. πβ¨
π¦ where this page comes from
- nixpkgs unstable: scheme-manpages 0-unstable-2024-02-11
- π the page's license: MIT
- Copyright (c) 2023 Gwen Weinholt
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms