equal
deleted
inserted
replaced
106 return result; |
106 return result; |
107 } |
107 } |
108 |
108 |
109 bool fpcrtl_strcompare(string255 str1, string255 str2) |
109 bool fpcrtl_strcompare(string255 str1, string255 str2) |
110 { |
110 { |
111 return memcmp(str1.s, str2.s, str1.len + 1) == 0; |
111 return memcmp(str1.str, str2.str, str1.len) == 0; |
112 } |
112 } |
113 |
113 |
114 bool fpcrtl_strcomparec(string255 a, char b) |
114 bool fpcrtl_strcomparec(string255 a, char b) |
115 { |
115 { |
116 if(a.len == 1 && a.str[0] == b){ |
116 if(a.len == 1 && a.str[0] == b){ |
125 return !fpcrtl_strcompare(a, b); |
125 return !fpcrtl_strcompare(a, b); |
126 } |
126 } |
127 |
127 |
128 bool fpcrtl_strncompareA(astring a, astring b) |
128 bool fpcrtl_strncompareA(astring a, astring b) |
129 { |
129 { |
130 return (a.len != b.len) || (memcmp(a.s, b.s, a.len) != 0); |
130 return (a.len != b.len) || (memcmp(a.str, b.str, a.len) != 0); |
131 } |
131 } |
132 |
132 |
133 |
133 |
134 string255 fpcrtl_pchar2str(const char *s) |
134 string255 fpcrtl_pchar2str(const char *s) |
135 { |
135 { |