StringExtensions
StringExtensions
String utilities for the Grid Building plugin. Pure functions for string manipulation without Godot dependencies. Ported from: godot/addons/grid_building/shared/utils/general/gb_string.gd
Project: GridPlacement v6.0
Layer: Godot
Source: Godot/Core/Common/Extensions/StringExtensions.cs
Namespace: GridBuilding.Core.Common.Extensions
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Methods
GetSeparatorString
Gets the separator string for the given enum value.
Returns: string
Parameters:
SeparatorType separatorType
GetSeparatorString
Gets the separator string for the given enum value (int overload for compatibility).
Returns: string
Parameters:
int separatorEnum
MatchNumSeparator
Checks if a character matches the given separator type.
Returns: bool
Parameters:
char characterSeparatorType separatorType
MatchNumSeparator
Checks if a character matches the given separator type (int overload).
Returns: bool
Parameters:
char characterint separatorEnum
ConvertNameToReadable
Converts a node name to a human readable display name string. Stops processing when it encounters the separator. Adds spaces before uppercase letters (PascalCase to Title Case).
Returns: string
Parameters:
string nodeNameSeparatorType separatorType
ToSnakeCase
Converts PascalCase or camelCase to snake_case.
Returns: string
Parameters:
string input
ToPascalCase
Converts snake_case to PascalCase.
Returns: string
Parameters:
string input
ToCamelCase
Converts snake_case to camelCase.
Returns: string
Parameters:
string input
RemoveNumericSuffix
Removes a numeric suffix from a name (e.g., “Node2” -> “Node”, “Enemy_3” -> “Enemy”).
Returns: string
Parameters:
string nameSeparatorType separatorType