Difference between revisions of "(File):lines"
m (Add links and missing fullstops.) |
(Added note on file closing upon reaching EOF) |
||
Line 9: | Line 9: | ||
=== Returns === | === Returns === | ||
{{param|function|iterator|The iterator (can be used in for loops).}} | {{param|function|iterator|The iterator (can be used in for loops).}} | ||
+ | === Notes === | ||
+ | If the EOF (end of file) is reached during iteration, the File will be automatically closed. | ||
== See Also == | == See Also == | ||
* [[parent::File]] | * [[parent::File]] |
Latest revision as of 00:08, 9 January 2025
Iterate over all the lines in a file.
Function
Synopsis
iterator = File:lines( )
Arguments
None.
Returns
function iterator
- The iterator (can be used in for loops).
Notes
If the EOF (end of file) is reached during iteration, the File will be automatically closed.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info