uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026

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.

UpTo

Method

Product: 

Class: 

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

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