Sub

Strings
Both Server and Client
Both Mobile and PC

After intercepting a string of a specified length from a specified position, output a new string

Declaration

func Sub(target string, startIndex int, length int) string
go

Parameters

Input

Name Type Description
Target String Target string
Start Index Int The position where the interception starts. The string position is calculated from 0
Length Int The interception length, by default, is intercepted to the end of the string

Return

Type Description
String The intercepted string