유돌이

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Notice

2009. 5. 26. 20:24 델파이

뭐하는 함수냐 하면. 혹시 DB에서 Text를 읽어와 TMemo에 그대로 뿌려준다던가,
혹은 다른 상황에서 이상한문자(♬나 º - 비슷하지만 아님)가 나와서
고민하신분 있으신가요?

Memo1.Text := AdjustLineBreaks(문자열..);

검색해 봤는데 없어서 올려봅니다.

-----------------------------------------------------------------------------

- SysUtils에 선언된 명령어 및 설명 입니다.
{ AdjustLineBreaks adjusts all line breaks in the given string to the
indicated style.
When Style is tlbsCRLF, the function changes all
CR characters not followed by LF and all LF characters not preceded
by a CR into CR/LF pairs.
When Style is tlbsLF, the function changes all CR/LF pairs and CR characters
not followed by LF to LF characters. }

function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle =
{$IFDEF LINUX} tlbsLF {$ENDIF}
{$IFDEF MSWINDOWS} tlbsCRLF {$ENDIF}): string;

- 도움말 설명 입니다.
On Windows:
function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle = tlbsCRLF): string;
On Linux:
function AdjustLineBreaks(const S: string; Style: TTextLineBreakStyle = tlbsLF): string;

Description
AdjustLineBreaks returns a text string with its line breaks adjusted to fit a specified style.
S is the string to convert.
Style indicates whether line breaks should all be Windows-style line breaks with a carriage return and linefeed (tlbsCRLF), or Linux-style breaks with a single linefeed character (tlbsLF). If Style is omitted, the style for the compile target is used.

 

 

출처: 델마당. 무대뽀(kazankros) 님의 글


posted by 유돌이