BBC.SHARED.JOBI.ESCAPE4POWERSHELL

Summary

Object type
JOBI
Object Folder
PACKAGES/BEST-BLU/BBC.SHARED/SOURCE/TEMPFILES
Title
Converts a string to be compatible for powershell (quoting)
Archive Key 1
-
Archive Key 2
-
Created
WRITER/B4A am: 2022-02-28 14:47:19
Last Modified
WRITER/B4A am: 2024-01-09 09:57:42 18 x
Last Used
-

Description

The include escapes a string to be used within powershell scripts

Parameter

$STRING$
string to convert

Input

Output

&BBCS_ESCAPED_STRING_O#
the escaped string to be used with powershell

Example

:include BBC.SHARED.JOBI.ESCAPE4POWERSHELL $STRING$ = "<value>"

Process

:set &BBCS_ESCAPED_STRING_O# = "$STRING$"
:set &BBCS_ESCAPED_STRING_O# = str_sub( &BBCS_ESCAPED_STRING_O#, '"', '`"' )
:set &BBCS_ESCAPED_STRING_O# = str_sub( &BBCS_ESCAPED_STRING_O#, "'", "`'" )
:set &BBCS_ESCAPED_STRING_O# = str_sub( &BBCS_ESCAPED_STRING_O#, "#", "`#" )
:set &BBCS_ESCAPED_STRING_O# = str_sub( &BBCS_ESCAPED_STRING_O#, "$", "`$")