Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

powershell slice string

$myString = "helloWorld"

# using the range operator [(start_i)..(end_i)]
$myString[3..8] -join ''  # 'loWorl'
$myString[-4..3] -join ''  # 'orldhello'

# using .Substring(start_i, substring_length)
$myString.Substring(3, 3)  # loWorl
$myString.Substring(1)  # elloWorld
Comment

PREVIOUS NEXT
Code Example
Shell :: termux update 
Shell :: linux hdparm 
Shell :: sed from match to end of file 
Shell :: how to copy folder in linux 
Shell :: git squase to rename author 
Shell :: npm install --save-dev shortcut 
Shell :: wsl storage does not release 
Shell :: bash how to use xargs 
Shell :: unzip gz file linux 
Shell :: github get repo size 
Shell :: git go back to commit 
Shell :: NGINX systemd service file 
Shell :: how to change mac address kali linux 
Shell :: linux check if a group exist or not 
Shell :: how to clear gradle cache gitignore 
Shell :: gitlab push to create 
Shell :: make zip file command 
Shell :: PowerShell script block 
Shell :: sed delete line match 
Shell :: teams ubuntu 
Shell :: add and install gem rails 
Shell :: docker copy folder to container 
Shell :: linux terminal show installed applications 
Shell :: failed to start high performance web server and reverse proxy 
Shell :: dns_probe_finished_nxdomain ubuntu 
Shell :: get diff stash 
Shell :: Bash echo to standard output from function 
Shell :: how to install pytesseract in rpi 
Shell :: how to kill recycling process linux 
Shell :: c# check if word is installed 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =