mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-14 20:14:30 +02:00
update for v6/v7 support
This commit is contained in:
parent
4871e9432b
commit
b10b99bd87
120 changed files with 1479 additions and 22 deletions
15
scripts/v6/ch9-04-create-global-func.rsc
Normal file
15
scripts/v6/ch9-04-create-global-func.rsc
Normal file
|
@ -0,0 +1,15 @@
|
|||
# filename: ch9-04-create-global-func.rsc
|
||||
|
||||
# function to remove spaces from a string
|
||||
#
|
||||
# e.g. :local NoSpaceVar [$RemoveSpaceFunc "string with spaces"]
|
||||
#
|
||||
:global RemoveSpaceFunc do={
|
||||
:local NewName ""
|
||||
for i from=0 to=([:len $1]-1) do={
|
||||
:local Tmp [:pick $1 $i]
|
||||
:if ($Tmp !=" ") do={ :set NewName "$NewName$Tmp" }
|
||||
}
|
||||
:return $NewName
|
||||
}
|
||||
# --- end of function ---
|
Loading…
Add table
Add a link
Reference in a new issue