
/*
	Simple checksum of a string
	Original Source: <http://cocoa.karelia.com/Foundation_Categories/NSString/Simple_checksum_of_.m>
	(See copyright notice at <http://cocoa.karelia.com>)
*/

/*"	Return a checksum of the string, calculated by adding the Unicode value of each character in the string into an integer total, ignoring overflow.
"*/

- (int) checksum
{
	int len = [self length];
	int total = 0;
	int i;
	for ( i = 0 ; i < len ; i++ )
	{
		unichar theChar = [self characterAtIndex:i];
		total += theChar;
	}
	return total;
}