-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStringTest.cs
57 lines (52 loc) · 1.51 KB
/
StringTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Text;
using System.Management;
namespace DotNetExp
{
class StringTest
{
/// <summary>
///
/// </summary>
/// <returns></returns>
public bool Run()
{
SplitCookie();
//checkTrimEnd();
//checkSplit();
return true;
}
/// <summary>
///
/// </summary>
private void SplitCookie()
{
// ASP.NET_SessionId=cm3bg4muwin1vmbovc1esjy3; host=SCANDICWEB101; ieAlertDisplay=true; scandic_lb_cookie=1702298890.0.0000; s_sv_sid=110733906247;
String CookieString = "ASP.NET_SessionId=cm3bg4muwin1vmbovc1esjy3; host=SCANDICWEB101; ieAlertDisplay=true; scandic_lb_cookie=1702298890.0.0000; s_sv_sid=110733906247;";
var parts = CookieString.Split(';');
return;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private bool checkSplit()
{
string abc = "name = \\wmi\\abc\\rtd\\tre";
Console.WriteLine(abc.Split('=')[1].Trim());
return true;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
private bool checkTrimEnd()
{
string path = "Y:\\";
string path1 = path.TrimEnd('\\');
Console.WriteLine("Path: " + path + Environment.NewLine + "path1: " + path1);
return true;
}
}
}