Class UZagalaSpecStepDefinitionStringLibrary#
Defined in File ZagalaSpecStepDefinitionStringLibrary.h
Inheritance Relationships#
Base Type#
public UBlueprintFunctionLibrary
Class Documentation#
-
class UZagalaSpecStepDefinitionStringLibrary : public UBlueprintFunctionLibrary#
Text helpers to build a step definition beautifier, in C++ or in Blueprint.
Each helper does one transformation, so a beautifier chains the ones its naming convention needs.
Public Static Functions
-
static FString RemoveUpToLastUnderscore(const FString &Input)#
Removes everything up to and including the last underscore (e.g.
“Step_GivenSomething” becomes “GivenSomething”).
- Parameters:
Input – The text to change.
- Returns:
The text after the last underscore; the input when it has no underscore or ends with one.
-
static FString RemovePrefix(const FString &Input, const FString &Prefix)#
Removes a prefix from the start of a text.
- Parameters:
Input – The text to change.
Prefix – The prefix to remove (case sensitive).
- Returns:
The text without the prefix; the input when it does not start with it.
-
static FString RemoveAnyPrefix(const FString &Input, const TArray<FString> &Prefixes)#
Removes the first listed prefix that starts the text and is followed by a capital letter, so a prefix only matches a whole word (e.g.
“StepAddItem” with prefix “Step” becomes “AddItem” while “Stepper” stays unchanged).
- Parameters:
Input – The text to change.
Prefixes – The prefixes to try, in order (case sensitive).
- Returns:
The text without the first matching prefix; the input when none matches.
-
static FString ReplaceUnderscoresWithSpaces(const FString &Input)#
Replaces every underscore with a space (e.g.
“given_some_step” becomes “given some step”).
- Parameters:
Input – The text to change.
- Returns:
The changed text.
-
static FString AddSpacesBeforeCapitalLetters(const FString &Input)#
Puts a space before each capital letter, keeping acronyms together (e.g.
“HTTPServerStep” becomes “HTTP Server Step”).
- Parameters:
Input – The text to change.
- Returns:
The changed text.
-
static FString ToSentenceCase(const FString &Input)#
Makes the first letter capital and the rest lower case (e.g.
“ADD ITEM” becomes “Add item”).
- Parameters:
Input – The text to change.
- Returns:
The changed text.
-
static FString RemoveUpToLastUnderscore(const FString &Input)#