Skip to content

Modern String Remain

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › String Library › String Library › Remain

Remain

Returns the text after a match, or an empty string if there is none.

Syntax

Remain( s, match [, start] [, ic] )
Remain( s, missing )

Notes

  • O(n*m) — text after match
  • ""

Examples

#import "std/strings"
using strings

print Remain( "Brevity is the soul of wit", "is " )   '' the soul of wit
print Remain( "Brevity is the soul of wit", "zzz" )   '' (empty) -- a miss gives ""

'' Remain and Extract are complements: before, and after
dim as ustring s = "key=value"
print Extract( 1, s, "=" ) & " -> " & Remain( s, "=" )   '' key -> value

Library: String Library
Category: String Library
Documented under: The Functions

Clone this wiki locally