Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HttpEncoderUtility.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.Web.Util
;
4
5
internal
static
class
HttpEncoderUtility
6
{
7
public
static
bool
IsUrlSafeChar
(
char
ch
)
8
{
9
if
((
ch
>=
'a'
&&
ch
<=
'z'
) || (
ch
>=
'A'
&&
ch
<=
'Z'
) || (
ch
>=
'0'
&&
ch
<=
'9'
))
10
{
11
return
true
;
12
}
13
switch
(
ch
)
14
{
15
case
'!'
:
16
case
'('
:
17
case
')'
:
18
case
'*'
:
19
case
'-'
:
20
case
'.'
:
21
case
'_'
:
22
return
true
;
23
default
:
24
return
false
;
25
}
26
}
27
28
[
return
: NotNullIfNotNull(
"str"
)]
29
internal
static
string
UrlEncodeSpaces
(
string
str
)
30
{
31
if
(
str
==
null
|| !
str
.Contains(
' '
))
32
{
33
return
str
;
34
}
35
return
str
.Replace(
" "
,
"%20"
);
36
}
37
}
System.Web.Util.HttpEncoderUtility.IsUrlSafeChar
static bool IsUrlSafeChar(char ch)
Definition
HttpEncoderUtility.cs:7
System.Web.Util.HttpEncoderUtility.UrlEncodeSpaces
static string UrlEncodeSpaces(string str)
Definition
HttpEncoderUtility.cs:29
System.Web.Util.HttpEncoderUtility
Definition
HttpEncoderUtility.cs:6
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Web.Util
Definition
HttpEncoder.cs:7
System.ExceptionArgument.str
@ str
System.ExceptionArgument.ch
@ ch
source
System.Web.HttpUtility
System.Web.Util
HttpEncoderUtility.cs
Generated by
1.10.0