28 lines
770 B
C
28 lines
770 B
C
#include "General.h"
|
|
|
|
//---------------------------------------------------------------------------------------
|
|
// StringLength
|
|
// ------------
|
|
//
|
|
// General : Checks the length of string.
|
|
//
|
|
// Parameters :
|
|
// str - a pointer of string (char *)
|
|
//
|
|
// Return value : The length of string (unsigned int).
|
|
//
|
|
//---------------------------------------------------------------------------------------
|
|
// Programmer : Cohen Idan
|
|
// Student No : 211675038
|
|
// Date : 30.12.2019
|
|
//---------------------------------------------------------------------------------------
|
|
unsigned int StringLength(char * str)
|
|
{
|
|
return ((!*str) ? ZERO : (StringLength(++str) + ONE));
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
|
|
}
|