そのためのメモ。
動作結果:
ソース:
-module(filenameTest).
-export([start/0]).
start() ->
Path = "C:\Dir\File.txt",
io:format("Path:~p~n",[Path]),
Split = filename:split(Path),
io:format("Split:~p~n",[Split]),
Path1 = "C:/Dir/File.txt",
io:format("~nPath1:~p~n",[Path1]),
Split1 = filename:split(Path1),
io:format("Split1:~p~n",[Split1]),
Path2 = list_to_binary(Path),
Splitter = <<" ">>,
Split2 = binary:split(Path2, Splitter),
io:format("~nSplit2:~p~n",[Split2]),
AddPath = Path ++ " " ++ Path1,
Path3 = list_to_binary(AddPath),
Split3 = binary:split(Path3, Splitter),
io:format("~nSplit3:~p~n",[Split3]).
0 件のコメント:
コメントを投稿