1
public
long
StrLen
(
const
char
*
s
)
2
{
3
long
len
=
0
;
4
if
(
s
!=
null
)
5
{
6
while
(
*
s
!=
'\0'
)
7
{
8
++
len
;
9
++
s
;
10
}
11
}
12
return
len
;
13
}