I need a string compare function - does one exist?
Yes. Just use any of the normal comparison operators.
A = "hello"
b = "hello"
IF a = b
Writeln("hello!");
You can also use > and < to see if a string is alphabetically less than or greater than.
As usual it was my dumb mistake.
I was doing the following:
if(struct.string = buffer)
I was getting a compile error but I realized that buffer was declared *buffer.
Changed to just buffer and now it compiles but seems to fail on the compare.
I will put some debug statements in the code and see why.
You mean the buffer was a pointer? Try
if (SomeStruct.Str = *buffer)
Always make sure your types match up. Comparing a string to a pointer won't compile. Comparing an integer to a pointer will compile, but will most likely fail since the integer won't hold the same value as the address the pointer holds.