Commit a6a36a31 authored by Hans Buchmann's avatar Hans Buchmann

ready for demo

parent 0efeac49
......@@ -75,30 +75,10 @@ int String::isHexDigit(char ch)
//--------------
//implementation
#if 1
unsigned String::len(char* s)
{
if (s==0) return 0; //null string
unsigned i=0; //index in s
while(true) //forever
{
if (s[i]=='\0') return i;
i=i+1; //++i
}
}
#endif
//variant
#if 0
unsigned String::len(char* s)
{
if (s==0) return 0; //null string
unsigned i=0;
for(;s[i]!='\0';++i){}
return i;
}
#endif
void String::copy(char* dst,char* src)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment