Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function propre (ch1,ch2:String): String;
- Var
- ch: String;
- Begin
- ch := ch1+'*';
- ch2 := ch2+'*';
- Repeat
- If Pos(Copy(ch2,1,Pos('_',ch2)),ch)=0 Then
- Begin
- ch := ch+Copy(ch2,1,Pos('*',ch2)-1)+'*';
- Delete (ch2,1,Pos('*',ch2));
- End
- Else
- If Copy(ch2,Pos('_',ch2)+1,1)>Copy (ch,Pos(Copy(ch2,1,2),ch)+2,1) Then
- Begin
- Delete (ch,Pos(Copy(ch2,1,2),ch),4);
- ch := ch+Copy(ch2,1,3)+'*';
- Delete (ch2,1,Pos('*',ch2));
- End
- Else
- Delete (ch2,1,Pos('*',ch2));
- Until (ch2='');
- propre := ch;
- End;
Add Comment
Please, Sign In to add comment