Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Convert Text in Pascal Case to Snake Case

Description
This macro will convert Pascal Case (PascalCase) text to Snake Case (snake_case).
Language
C#.net
Minimum Version
Created By
Chris Gallagher
Contributors
-
Date Created
Feb 6, 2023
Date Last Modified
Feb 6, 2023

Macro Code

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

public static class ClipboardFusionHelper
{
	public static string ProcessText(string text)
	{
		string input = Regex.Replace(text, "(\\B[A-Z])", "_$1");
		return input.ToString().ToLower();
	}
}