- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
-module(common_io).
-export([read_utf8/2, default_fallback/1]).
default_fallback(<<Data>>)->
erlang:display(Data).
read_utf8(Collected, <<Utf8Char/utf8>>, _CallAfter)->
lists:append(Collected, [Utf8Char]);
read_utf8(Collected, <<Utf8Char/utf8, Data/binary>>, CallAfter)->
lists:append([Collected, [Utf8Char], read_utf8(Data, CallAfter)]);
read_utf8(Collected, <<Data/binary>>, CallAfter)->
CallAfter(Data),
Collected;
read_utf8(Collected, <<>>, _CallAfter)->
Collected.
read_utf8(<<>>, _CallAfter)->
[];
read_utf8(<<Utf8Char/utf8>>, _CallAfter)->
[Utf8Char];
read_utf8(<<Data/binary>>, CallAfter)->
read_utf8([], Data, CallAfter).
guest 24.05.2011 18:04 # +3
da4ever 25.05.2011 06:40 # +1
guest8 08.04.2019 21:10 # −999
guest8 09.04.2019 10:49 # −999
guest8 09.04.2019 17:58 # −999