From 1d87c1ae8fdb24bad9c9a513acaadbb06b218cdb Mon Sep 17 00:00:00 2001 From: SeedList Date: Wed, 18 Jun 2025 15:52:30 +0800 Subject: [PATCH] vault backup: 2025-06-18 15:52:30 --- SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index 47407cf3..350a4e44 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -491,10 +491,9 @@ begin end. ``` -## 转换了一下连接字符 - -当要设置自定义分隔符号,要将==**StringList.Delimiter := '-'; // 设置分隔符为分号**==往前面放 +## 转换字符串数组的连接字符 +当要设置自定义分隔符号,`StringList.Delimiter := '-';` 需要写在转化语句之前 ```uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs, CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas; @@ -512,13 +511,10 @@ begin if fedtusr_lb.Text <> '' then StringList.Add(fedtusr_lb.Text); -==**StringList.Delimiter := '-'; // 设置分隔符为分号**== + StringList.Delimiter := '-'; // 设置分隔符为分号 // 转换为逗号分隔的字符串 fedtFShtName.Text := StringList.DelimitedText; // 默认使用逗号作为分隔符 - // 如果需要指定其他分隔符,可以设置Delimiter属性 - - // Result := StringList.DelimitedText; finally StringList.Free; end;