/**********************************************************************
 * Copyright (c) 2005, 2006 Scapa Technologies Limited and others
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * $Id: streq.c,v 1.2 2006/10/26 22:40:21 kcallaghan Exp $
 * 
 * Contributors: 
 * Scapa Technologies Limited - Initial API and implementation
 **********************************************************************/

#include "system.h"

int StrEq(char* a, char* b) {
	int index = 0;
	char ch_a, ch_b;

	if (a == NULL) {
		return -1;
	} else if (b == NULL) {
		return -1;
	}

	while (0==0) {
		ch_a = a[index];
		ch_b = b[index];

		if (ch_a != ch_b) return index+1;

		//could get rid of the OR here?
		if (ch_a == '\0' || ch_b == '\0') {
			return 0;
		}

		index++;
	}
}
