aboutsummaryrefslogtreecommitdiff
path: root/source/common.elna
diff options
context:
space:
mode:
Diffstat (limited to 'source/common.elna')
-rw-r--r--source/common.elna13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/common.elna b/source/common.elna
index 8bba90f..9e6a314 100644
--- a/source/common.elna
+++ b/source/common.elna
@@ -78,4 +78,17 @@ begin
return nil
end
+(* Returns true or false depending whether two strings are equal. *)
+proc string_compare*(lhs_pointer: ^Char; lhs_length: Word; rhs_pointer: String): Bool
+var
+ result: Bool
+begin
+ if lhs_length = rhs_pointer.length then
+ result := memcmp(lhs_pointer, rhs_pointer.ptr, lhs_length) = 0
+ else
+ result := false
+ end;
+ return result
+end
+
end.