From 43a938987f3739f62ee85b012dc23350709e96b6 Mon Sep 17 00:00:00 2001 From: Bartek 'ftpd' Stalewski Date: Mon, 25 Jun 2012 14:53:05 +0200 Subject: [PATCH] Nowe makro. --- common/substitute.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/substitute.tf b/common/substitute.tf index 5a6388d..39ca76c 100644 --- a/common/substitute.tf +++ b/common/substitute.tf @@ -111,3 +111,11 @@ ;; /lc /def nf = /quote -S /unset `/listvar -s *_k*_bije + +/def typo =\ + /let n=$[strchr({*}, '|')]%;\ + /test param1 := substr({*}, 0, n) %;\ + /test param2 := substr({*}, n+1) %;\ + /echo -p @{BCyellow}###@{n} Zdefiniowana podmiana: @{B}%{param1}@{n} => @{B}%{param2}@{n} %;\ + /def -mregexp -h'SEND %{param1}'\ + typo_%{1} = /send $$[strcat ({PL}, '%{param2}', replace('%{param1}', '%{param2}', {PR}))]