[erlang-questions] Getting the number of columns of a terminal

Juan Jose Comellas juanjo@REDACTED
Tue Jan 17 15:37:58 CET 2012

Thanks! This is exactly what I had been looking for. I don't know how
I had overlooked it.


On Tue, Jan 17, 2012 at 11:27 AM, Jachym Holecek <freza@REDACTED> wrote:
> # Juan Jose Comellas 2012-01-17:
>> Does anybody know if there's any way of getting the number of columns
>> in a terminal in a portable way in Erlang (i.e. not using curses or
>> anything else that's not available on other platforms)? I need to wrap
>> some lines that I'm showing on a terminal and I'd rather use the real
>> terminal's width instead hardcoding it to 80 characters or so.
> io:columns/N should do it?
> BR,
>        -- Jachym

More information about the erlang-questions mailing list