function Encode(Str: string): string; var //加密 TmpChr: AnsiChar; i, Len: integer; begin Result := Str; Len := Length(Result); TmpChr := Result[1]; for i := 1 to Len - 1 do Result[i] := Result[i + 1]; Result[Len] := TmpChr; end; function Decode(Str: s
1. 提取字符串中指定子字符串前的字符串 Function Before( Src:string ; S:string ): string ; Var F: Word ; begin F:= POS(Src,S) ; if F=0 then Before := S else Before := COPY(S,1,F-1) ; end ; eg: Before('123','helloworld_123') 返回结果:helloworld_ 2.
using System; using System.IO; using System.Text.RegularExpressions; using System.Windows.Browser; namespace SL_COMMON { public class Utils { #region String字符串类 /**/ /// <summary> /// 过滤字符 /// </summary> public static string Replace(string str