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-03-24 08:00:43
Last Modified
WRITER/B4A am: 2022-07-01 19:11:52 11 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#, "$", "`$")