Class DefaultShortStringHelperConfig.Config
Represents configuration settings for a specific string type and culture combination.
Inheritance
Namespace: Umbraco.Cms.Core.Strings
Assembly: Umbraco.Core.dll
Syntax
public sealed class DefaultShortStringHelperConfig.Config
Constructors
View SourceConfig()
Initializes a new instance of the DefaultShortStringHelperConfig.Config class with default settings.
Declaration
public Config()
Properties
View SourceBreakTermsOnUpper
Gets or sets a value indicating whether an uppercase character within a term (e.g., "fooBar") should break into a new term, or be considered as part of the current term.
Declaration
public bool BreakTermsOnUpper { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
CutAcronymOnNonUpper
Gets or sets a value indicating whether a non-uppercase character within an acronym (e.g., "FOOBar") should cut the acronym or give up the acronym and treat the term as a word.
Declaration
public bool CutAcronymOnNonUpper { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
GreedyAcronyms
Gets or sets a value indicating whether acronym parsing is greedy, i.e., whether "FOObar" is "FOO" + "bar" (greedy) or "FO" + "Obar" (non-greedy).
Declaration
public bool GreedyAcronyms { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsTerm
Gets or sets a function that determines whether a character is a valid term character.
Declaration
public Func<char, bool, bool> IsTerm { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<char, bool, bool> |
Remarks
The first parameter is the character, the second indicates whether it is a leading character.
PostFilter
Gets or sets a function to apply after string processing.
Declaration
public Func<string, string>? PostFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<string, string> |
PreFilter
Gets or sets a function to apply before string processing.
Declaration
public Func<string, string>? PreFilter { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<string, string> |
Separator
Gets or sets the separator character to use between terms.
Declaration
public char Separator { get; set; }
Property Value
| Type | Description |
|---|---|
| char |
Remarks
Use char.MinValue to indicate no separator.
StringType
Gets or sets the target string type (casing and encoding).
Declaration
public CleanStringType StringType { get; set; }
Property Value
| Type | Description |
|---|---|
| CleanStringType |
Methods
View SourceClone()
Creates a deep copy of this configuration.
Declaration
public DefaultShortStringHelperConfig.Config Clone()
Returns
| Type | Description |
|---|---|
| DefaultShortStringHelperConfig.Config | A new DefaultShortStringHelperConfig.Config instance with the same settings. |
StringTypeExtend(CleanStringType)
Extends the configuration's string type with values from the specified string type.
Declaration
public CleanStringType StringTypeExtend(CleanStringType stringType)
Parameters
| Type | Name | Description |
|---|---|---|
| CleanStringType | stringType | The string type to merge into this configuration. |
Returns
| Type | Description |
|---|---|
| CleanStringType | The merged string type. |