website logo
Navigate through spaces
Carrot reference
⌘K
Carrot reference
Getting started with Carrot
Premade Carrot filters
Operator precedence
Expression truthiness
Carrot fields
Basic Org Information
Compensation
Job Changes
Permissions
Personal
Recruiting
Structure
Time off
Data types
Elements of Carrot expressions
Functions
Operators
Keywords
Aggregators
Docs powered by archbee 
website logo

subString()

Given a String and specified parameters, returns a part of that String.

Syntax

subString(string, start[, length])

  • string - the String value from which to derive the returned String
  • start - the starting index of the returned String
  • length - (optional) the length of the returned String
  • Return type: String

Sample usage

subString("Piece of cake.", 2) returns "ece of cake."

subString("Piece of cake.", 2, 3) returns "ece"

Supported data types

Input type

Return type

Logic

String

String

If a String value is passed, that value will be interpreted beginning with the start index. If a length is provided, the returned String will contain that many characters, beginning with the index. If not, the returned String will contain all remaining characters beginning with the index.

Unsupported data types

Null

Unsupported data types return Null.

Updated 01 Feb 2023
Did this page help you?
Yes
No
UP NEXT
stockPrice()
Docs powered by archbee