Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EstimateWordCount()

int Terraria.Localization.LanguageManager.EstimateWordCount ( )
inline

Definition at line 61 of file LanguageManager.cs.

62 {
63 int num = 0;
64 foreach (string key in _localizedTexts.Keys)
65 {
66 string textValue = GetTextValue(key);
67 textValue.Replace(",", "").Replace(".", "").Replace("\"", "")
68 .Trim();
69 string[] array = textValue.Split(' ');
70 string[] array2 = textValue.Split(' ');
71 if (array.Length != array2.Length)
72 {
73 break;
74 }
75 string[] array3 = array;
76 foreach (string text in array3)
77 {
78 if (!string.IsNullOrWhiteSpace(text) && text.Length >= 1)
79 {
80 num++;
81 }
82 }
83 }
84 return num;
85 }
readonly Dictionary< string, LocalizedText > _localizedTexts

References Terraria.Localization.LanguageManager._localizedTexts, System.array, Terraria.Localization.LanguageManager.GetTextValue(), System.key, System.Collections.Generic.Dictionary< TKey, TValue >.Keys, and System.text.