Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

StringExtensions

API reference for StringExtensions in Vendr, the eCommerce solution for Umbraco v8+

StringExtensions

String extension methods

public static class StringExtensions

Namespace

Methods

IsComplexJson

Tries to figure out if the input string is a serialized JSON object/array

public static bool IsComplexJson(this string input)

Parameters

Parameter Description
input
The input string

Returns

A true if string is serialized JSON, otherwise false


IsJson

Tries to figure out if the input string is a serialized JSON value

public static bool IsJson(this string input)

Parameters

Parameter Description
input
The input string

Returns

A true if string is serialized JSON, otherwise false


ReplaceEnd

Replaces an original string from the end of an input string with the given replacement

public static string ReplaceEnd(this string input, string original, string replacement)

Parameters

Parameter Description
input
The input string
original
The original string to look for
replacement
The string to replace the original string with

Returns

The updated string


TryParse<T>

Tries to parse a string into a strongly typed value

public static T? TryParse<T>(this string input)
    where T : struct

Parameters

Parameter Description
T
The output type
input
The input string

Returns

A nullable output type

Edit this page on GitHub

Site + logo design © 2025 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.