mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: introduce $Unix2Dos
This commit is contained in:
parent
62707dc549
commit
7d3c4738d0
1 changed files with 11 additions and 0 deletions
|
@ -55,6 +55,7 @@
|
|||
:global SendNotification2;
|
||||
:global SymbolByUnicodeName;
|
||||
:global SymbolForNotification;
|
||||
:global Unix2Dos;
|
||||
:global UrlEncode;
|
||||
:global ValidateSyntax;
|
||||
:global VersionToNum;
|
||||
|
@ -1125,6 +1126,16 @@
|
|||
:return ($Return . " ");
|
||||
}
|
||||
|
||||
# convert line endings, UNIX -> DOS
|
||||
:set Unix2Dos do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global CharacterReplace;
|
||||
|
||||
:return [ $CharacterReplace [ $CharacterReplace $Input \
|
||||
("\n") ("\r\n") ] ("\r\r\n") ("\r\n") ];
|
||||
}
|
||||
|
||||
# url encoding
|
||||
:set UrlEncode do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
|
Loading…
Reference in a new issue