Table of Contents

Class StringExtensions

Namespace
CarrotMQ.Core.Common
Assembly
CarrotMQ.Core.dll

Extension methods for the string type.

public static class StringExtensions
Inheritance
StringExtensions
Inherited Members

Methods

Truncate(string?, int)

Truncates the specified string to the specified maximum length.

public static string? Truncate(this string? value, int maxLength)

Parameters

value string

The string to truncate.

maxLength int

The maximum length of the truncated string.

Returns

string

A truncated string if the length exceeds the specified maximum length; otherwise, the original string.