UpTo

Method

Returns a substring with all text up to and including the matched pattern

SDK version: 

5.7.0-preview.3 8/14/2026

Product: 

Class: 

Warning

uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.

Syntax

UpTo(string, int)

Parameters

Pattern
string
Pattern to match
Nth
int
(Default = 1)
nth occurence

Return

String

uCalc String object

Remarks

Returns all text up to and including the matched pattern. By default it goes up to the first occurence of a match, but you may elect to have it go up to the nth occurence.

Examples

This page last modified on: 

8/7/2026