Copyright © tutorialspoint.com
Syntax
Definition and UsageReturns a substring of EXPR, starting at OFFSET within the string. If OFFSET is negative, starts that many characters from the end of the string. If LEN is specified, returns that number of bytes, or all bytes up until end-of-string if not specified. If LEN is negative, leaves that many characters off the end of the string. If REPLACEMENT is specified, replaces the substring with the REPLACEMENT string. If you specify a substring that passes beyond the end of the string, it returns only the valid element of the original string. Return Value
ExampleTry out following example:
It will produce following result:
|
Copyright © tutorialspoint.com