Barotrauma Server Doc
Barotrauma.RichString Class Reference

Public Member Functions

void RetrieveValue ()
 
RichString ToUpper ()
 
RichString ToLower ()
 
RichString Replace (string from, string to, StringComparison stringComparison=StringComparison.Ordinal)
 
override string ToString ()
 
bool Contains (string str, StringComparison stringComparison=StringComparison.Ordinal)
 
bool Contains (char chr, StringComparison stringComparison=StringComparison.Ordinal)
 

Static Public Member Functions

static RichString Rich (LocalizedString str, Func< string, string >? postProcess=null)
 
static RichString Plain (LocalizedString str)
 
static implicit operator LocalizedString (RichString richStr)
 
static implicit operator RichString (LocalizedString lStr)
 
static implicit operator RichString (string str)
 
static bool operator== (RichString? a, RichString? b)
 
static bool operator!= (RichString? a, RichString? b)
 
static bool operator== (RichString? a, LocalizedString? b)
 
static bool operator!= (RichString? a, LocalizedString? b)
 
static bool operator== (LocalizedString? a, RichString? b)
 
static bool operator!= (LocalizedString? a, RichString? b)
 
static bool operator== (RichString? a, string? b)
 
static bool operator!= (RichString? a, string? b)
 
static bool operator== (string? a, RichString? b)
 
static bool operator!= (string? a, RichString? b)
 

Public Attributes

readonly LocalizedString SanitizedString
 

Protected Member Functions

virtual bool MustRetrieveValue ()
 

Protected Attributes

bool loaded = false
 
LanguageIdentifier language = LanguageIdentifier.None
 
string cachedSanitizedValue = ""
 

Properties

string SanitizedValue [get]
 
int Length [get]
 
LocalizedString NestedStr [get]
 
ImmutableArray< RichTextData >? RichTextData [get]
 

Detailed Description

Definition at line 8 of file RichString.cs.

Member Function Documentation

◆ Contains() [1/2]

bool Barotrauma.RichString.Contains ( char  chr,
StringComparison  stringComparison = StringComparison.Ordinal 
)

◆ Contains() [2/2]

bool Barotrauma.RichString.Contains ( string  str,
StringComparison  stringComparison = StringComparison.Ordinal 
)

◆ MustRetrieveValue()

virtual bool Barotrauma.RichString.MustRetrieveValue ( )
protectedvirtual

Definition at line 91 of file RichString.cs.

◆ operator LocalizedString()

static implicit Barotrauma.RichString.operator LocalizedString ( RichString  richStr)
static

◆ operator RichString() [1/2]

static implicit Barotrauma.RichString.operator RichString ( LocalizedString  lStr)
static

Definition at line 79 of file RichString.cs.

◆ operator RichString() [2/2]

static implicit Barotrauma.RichString.operator RichString ( string  str)
static

◆ operator!=() [1/5]

static bool Barotrauma.RichString.operator!= ( LocalizedString a,
RichString b 
)
static

◆ operator!=() [2/5]

static bool Barotrauma.RichString.operator!= ( RichString a,
LocalizedString b 
)
static

◆ operator!=() [3/5]

static bool Barotrauma.RichString.operator!= ( RichString a,
RichString b 
)
static

◆ operator!=() [4/5]

static bool Barotrauma.RichString.operator!= ( RichString a,
string?  b 
)
static

◆ operator!=() [5/5]

static bool Barotrauma.RichString.operator!= ( string?  a,
RichString b 
)
static

◆ operator==() [1/5]

static bool Barotrauma.RichString.operator== ( LocalizedString a,
RichString b 
)
static

◆ operator==() [2/5]

static bool Barotrauma.RichString.operator== ( RichString a,
LocalizedString b 
)
static

◆ operator==() [3/5]

static bool Barotrauma.RichString.operator== ( RichString a,
RichString b 
)
static

◆ operator==() [4/5]

static bool Barotrauma.RichString.operator== ( RichString a,
string?  b 
)
static

◆ operator==() [5/5]

static bool Barotrauma.RichString.operator== ( string?  a,
RichString b 
)
static

◆ Plain()

static RichString Barotrauma.RichString.Plain ( LocalizedString  str)
static

Definition at line 72 of file RichString.cs.

◆ Replace()

RichString Barotrauma.RichString.Replace ( string  from,
string  to,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Definition at line 139 of file RichString.cs.

◆ RetrieveValue()

void Barotrauma.RichString.RetrieveValue ( )

Definition at line 102 of file RichString.cs.

◆ Rich()

static RichString Barotrauma.RichString.Rich ( LocalizedString  str,
Func< string, string >?  postProcess = null 
)
static

Definition at line 67 of file RichString.cs.

◆ ToLower()

RichString Barotrauma.RichString.ToLower ( )

Definition at line 134 of file RichString.cs.

◆ ToString()

override string Barotrauma.RichString.ToString ( )

Definition at line 144 of file RichString.cs.

◆ ToUpper()

RichString Barotrauma.RichString.ToUpper ( )

Definition at line 129 of file RichString.cs.

Member Data Documentation

◆ cachedSanitizedValue

string Barotrauma.RichString.cachedSanitizedValue = ""
protected

Definition at line 14 of file RichString.cs.

◆ language

LanguageIdentifier Barotrauma.RichString.language = LanguageIdentifier.None
protected

Definition at line 11 of file RichString.cs.

◆ loaded

bool Barotrauma.RichString.loaded = false
protected

Definition at line 10 of file RichString.cs.

◆ SanitizedString

readonly LocalizedString Barotrauma.RichString.SanitizedString

Definition at line 31 of file RichString.cs.

Property Documentation

◆ Length

int Barotrauma.RichString.Length
get

Definition at line 24 of file RichString.cs.

◆ NestedStr

LocalizedString Barotrauma.RichString.NestedStr
get

Definition at line 30 of file RichString.cs.

◆ RichTextData

ImmutableArray<RichTextData>? Barotrauma.RichString.RichTextData
get

Definition at line 42 of file RichString.cs.

◆ SanitizedValue

string Barotrauma.RichString.SanitizedValue
get

Definition at line 15 of file RichString.cs.