2ちゃんねる スマホ用 ■掲示板に戻る■ 全部 1- 最新50    

Julia Juno Jupyter part1

24 :デフォルトの名無しさん:2016/02/15(月) 10:31:07.93 ID:TvNTryet.net
うむむ
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes(""))
"ab [ ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E381824141"))
"ab [AAあAA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E981824141"))
"ab [AA遂AA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141Ee81824141"))
"ab [AA\ue042AA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141Ef81824141"))
"ab [AA\uf042AA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E881824141"))
"ab [AA聂AA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E8e8824141"))
"ab [AA騂AA ]"
julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("4141E9e8824141"))
"ab [AAꨂAA ]"

julia> @sprintf "ab [%-7s]" bytestring(hex2bytes("414155aa554141"))
ERROR: UnicodeError: invalid character index
in next at unicode/utf8.jl:65
in strwidth at strings/basic.jl:205
[inlined code] from printf.jl:159
in anonymous at no file:0

julia> @sprintf "ab [%-7s]" hex2bytes("414155aa554141")
"ab [UInt8[0x41,0x41,0x55,0xaa,0x55,0x41,0x41]]"

169 KB
新着レスの表示

掲示板に戻る 全部 前100 次100 最新50
名前: E-mail (省略可) :

read.cgi ver 2014.07.20.01.SC 2014/07/20 D ★