Read a file character by character/UTF8: Difference between revisions

no edit summary
m (syntax highlighting fixup automation)
No edit summary
Line 1,371:
<syntaxhighlight lang="tcl">fconfigure $channel -buffersize $byteCount</syntaxhighlight>
When the channel is only being accessed from Tcl (or via Tcl's C API) it is not normally necessary to adjust this option.
 
=={{header|Vlang}}==
<syntaxhighlight lang="vlang">
import os
 
fn main() {
file := './file.txt'
mut content_arr := []u8{}
if os.is_file(file) == true {
content_arr << os.read_bytes(file) or {
println('Error: can not read')
exit(1)
}
}
else {
println('Error: can not find file')
exit(1)
}
 
println(content_arr.bytestr())
}
</syntaxhighlight>
 
=={{header|Wren}}==
291

edits