mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-07-14 03:54:29 +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
|
@ -1,24 +0,0 @@
|
|||
# filename: ch9-06-str-funcs-mod.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 ---
|
||||
|
||||
# function to remove last char from a string
|
||||
#
|
||||
# e.g. :local ChoppedVar [$chopStrFunc "string with extra char,"]
|
||||
#
|
||||
:global ChopStrFunc do={
|
||||
:return [ :pick $1 0 ( [ :len $1 ] -1 ) ];
|
||||
}
|
||||
# --- end of function ---
|
Loading…
Add table
Add a link
Reference in a new issue