S&box Wiki

Sandbox.StringX.Snippet

Syntax

static string Snippet( string source, string find, int padding )

Description

Given a large string, find all occurrances of a substring and return them with padding. This is useful in situations where you're searching for a word in a hug body of text, and want to show how it's used without displaying the whole text.

Arguments

string source
string find
int padding

Returns

string