码迷,mamicode.com
首页 > Windows程序 > 详细

DELPHI 去字符串中所有空格

时间:2017-04-13 18:01:14      阅读:457      评论:0      收藏:0      [点我收藏+]

标签:nbsp   begin   字符串   class   integer   str   result   delphi   空格   

class function yxm.trimblank(s: string): string;
var
  i, j: integer;
begin
  repeat
    i := pos(‘ ‘, s);
    j := length(s);
    if i > 0 then
      s := copy(s, 1, i - 1) + copy(s, i + 1, j - i);
  until i = 0;

  Result := s;
end;

DELPHI 去字符串中所有空格

标签:nbsp   begin   字符串   class   integer   str   result   delphi   空格   

原文地址:http://www.cnblogs.com/yangxuming/p/6704983.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!