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

◆ TryReadAgent()

static bool System.Net.Http.Headers.WarningHeaderValue.TryReadAgent ( string input,
int startIndex,
ref int current,
[NotNullWhen(true)] out string agent )
inlinestaticprivate

Definition at line 157 of file WarningHeaderValue.cs.

158 {
159 int hostLength = HttpRuleParser.GetHostLength(input, startIndex, allowToken: true, out agent);
160 if (hostLength == 0)
161 {
162 return false;
163 }
164 current += hostLength;
165 int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
166 current += whitespaceLength;
167 if (whitespaceLength == 0 || current == input.Length)
168 {
169 return false;
170 }
171 return true;
172 }

References System.Net.Http.HttpRuleParser.GetHostLength(), System.Net.Http.HttpRuleParser.GetWhitespaceLength(), System.input, and System.startIndex.

Referenced by System.Net.Http.Headers.WarningHeaderValue.GetWarningLength().