function __han(str: string): integer;
var
i: integer;
begin
result := 0; //ENG
for i := 0 to Length(str) do begin
if ByteType( str, i) <> mbSingleByte then begin
result := 1; //HAN
break;
end;//end if
end;//end for
end;
var
i: integer;
begin
result := 0; //ENG
for i := 0 to Length(str) do begin
if ByteType( str, i) <> mbSingleByte then begin
result := 1; //HAN
break;
end;//end if
end;//end for
end;
function checkHangul(Msg: String): Integer;
var
i, j: integer;
begin
j := 0;
result := 0; //ENG(1 Byte)
for i := 0 to length(Msg) - 1 do begin
if IsDBCSLeadByte(Byte(Msg[i])) then begin
if Msg[i] = '? then result := 0 //ENG(1 Byte)
else Inc(j);
if j > 10 then begin
result := 1; //HAN(2 Byte)
break;
end;//end if
end;//end if
end;//end for
end;
'Academy I > Tech Academy' 카테고리의 다른 글
[Delphi]Skin Components (0) | 2019.06.19 |
---|---|
[Delphi]크롬 브라우저를 특정 URL로 띄우기 (0) | 2019.05.16 |
[Delphi]Read and Write: ListView (0) | 2019.03.07 |
[Delphi]Save to Internet Image (0) | 2019.03.06 |
[Delphi]Pointer (0) | 2019.02.20 |
[Delphi]인터넷 연결 상태 확인 (0) | 2019.01.31 |
[Delphi]실제 웹페이지 주소연결을 체크하는 방법 (0) | 2019.01.31 |
[Delphi]Form이 없는 윈도우 종료 감지하기 (0) | 2019.01.31 |