-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandArgs.cs
More file actions
61 lines (58 loc) · 1.46 KB
/
CommandArgs.cs
File metadata and controls
61 lines (58 loc) · 1.46 KB
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
58
59
60
61
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Zyxel
{
public class Parser
{
string[] args = null;
public Parser(string[] args)
{
this.args = args;
}
public string FindParamsAndArgs(string Params, out bool Finds)
{
string ret = "";
bool bol = false;
for (int i = 0; i < args.Length; i++)
{
if (args[i] == Params)
{
ret = args[i + 1];
break;
}
}
Finds = bol;
return ret;
}
public bool FindParamsAndArgs(string Params, out string Finds)
{
string ret = "";
bool bol = false;
for (int i = 0; i < args.Length; i++)
{
if (args[i] == Params)
{
ret = args[i + 1];
break;
}
}
Finds = ret;
return bol;
}
public bool FindParams(string Params)
{
bool bol = false;
for (int i = 0; i < args.Length; i++)
{
if (args[i] == Params)
{
bol = true;
break;
}
}
return bol;
}
}
}