Skip to content

Instantly share code, notes, and snippets.

View rklec's full-sized avatar

rklec

  • 18:04 (UTC +02:00)
View GitHub Profile
@rklec
rklec / StringExtensions.cs
Last active February 12, 2024 14:09
StringExtensions -> TruncateInMiddle for Stackexchange
using System;
/// <summary>
/// Common extensions for manipulating strings.
/// </summary>
public static class StringExtensions
{
/// <summary>
/// This truncates/abbreviates the string and places the separator as a user-facing indicator <i>in the middle</i> of that string.
/// </summary>