Delphi
function Right_mc (s: string; StartPattern: string; CaseSensitive:boolean=false):string; overload; var tempStr : string; j : integer; begin tempStr := s; j := pos(StartPattern, tempStr); if j = 0 then tempStr := '' else tempStr := copy(tempStr, j+length(StartPattern), length(tempStr)); Right_mc := tempStr ; end; |
function Right_mc (s: String, StartPattern: String, CaseSensitive:Boolean=false):String { var tempStr : String; var j : int; tempStr = s; j = tempStr.indexOf(StartPattern); if (j == -1) { tempStr = ''; } else { tempStr = s.substring(j+StartPattern.length, tempStr.length); } return tempStr; } |
Common Problems
Delphi | ActionScript | |||
---|---|---|---|---|
Compare | Single equals sign
| Double equals sign
| ||
Assignment | Colon followed by a equals sign
| Single equals sign
| ||
for Blocks | Run until the condition is met
| Run while the condition is met
|