function StrLeft(const S: AnsiString; Count: Integer): AnsiString;
begin
Result := Copy(S, 1, Count);
end;//------------------------------------------------------------------------------function StrMid(const S: AnsiString; Start, Count: Integer): AnsiString;
begin
Result := Copy(S, Start, Count);
end;//------------------------------------------------------------------------------function StrRight(const S: AnsiString; Count: Integer): AnsiString;
begin
Result := Copy(S, Length(S) - Count + 1, Count);
end;
begin
Result := Copy(S, 1, Count);
end;//------------------------------------------------------------------------------function StrMid(const S: AnsiString; Start, Count: Integer): AnsiString;
begin
Result := Copy(S, Start, Count);
end;//------------------------------------------------------------------------------function StrRight(const S: AnsiString; Count: Integer): AnsiString;
begin
Result := Copy(S, Length(S) - Count + 1, Count);
end;
解决方案 »
- 关于webbrowser控件修改OleCtrls.pas的问题. 效果明显. 但还是占较多内存. 大家是怎么处理的?
- delphi 的comparetext比较汉字?
- 获取shtm文件的标题
- 星战前传3-西斯的复仇[DVD中文字幕]
- 大家好,能不能帮我看看:客户端怎么连不上服务器数据库(我们的网是通的)?先给100分,不够了再加!
- 求救,有关API函数mcisendstring的应用?
- 访问sql server数据库的问题(严重困扰)
- 救命,我的主窗体不见了
- 各们大侠,treeview的imageindex怎么用呀!
- Jvcl 3.49 xe8 问题
- 这里的网管怎么搞的,明明显示我的专家分 35,可用分 3393,参与分 753,可我最多只能给分
- 麻烦各位帮助我解决两个小问题,见者有分
function RightStr (const S : string; const N : Integer): string;
var
M: Integer;
begin
M := Length (S) - N + 1;
if M < 1 then
M := 1;
Result := Copy (S, M, N);
end;function LeftTillStr (const S : string; const Ch : Char): string;
var
M: Integer;
begin
M := Pos (Ch, S);
if M < 2 then
Result := ''
else
Result := Copy (S, 1, M - 1);
end;function RightAfterStr (const S : String; const N : Integer): String;
begin
Result := Copy (S, N + 1, Length (S) - N );
end;