minimal stdin wrapper for julia.
This module uses original type DlmType
defined as below.
DlmType = Union{
AbscractChar,
AbscractString,
Regex
}
Default delimiter is " "
.You can indicate specific delimiter like readXXX(delimiter=",")
.
Note This packages function returns a single value when args is only one. else returns array.
parse inputs to Int.
readInt() #<-- 1
#--> 1
readInt() #<-- 1 2 3 4 5
#--> [1, 2, 3, 4, 5]
readInt(delimiter=',') #<--6,7,8,9,10
#--> [6, 7, 8, 9, 10]
parse inputs to string.
readString() #<-- Lorem
#--> "Lorem"
readString() #<-- Lorem ipsum es
#-->["Lorem", "ipsum", "es"]
parse inputs to any types you want. First argument MUST be a type name.
readGeneral(Complex{Fload64}) #<--1.2e-3+4j -9+6.8i 0.0004 90.5im
#-->[0.0012+4.0im, -9.0+6.8im, 0.0004+0.0im, 0.0+90.5im]