Rawequal: Difference between revisions
Jump to navigation
Jump to search
(Adding categories) |
(saf gg fuksvdafgasudkyfgkasuydgfaksdg fyasuk gfyasukfuadsgfvhjkbahsdkhfvbskaudhfvjhgasdvfghjadsvfghvsghbvbhvsdhgbfhgujsdb fuhjsdb fkuhjsvdkhgfvsakghf sghad fvkhgsjdv fghsadvfhasdjfgkjhavshkjd fvkhjasdv fjhkasvfhjvdsfhjvasdhfjkasdjhfvashjkfvajhskdv...) |
||
| Line 1: | Line 1: | ||
{{ApiReference | I CAUSED MAYHEM ON BTN AND LUA{{ApiReference | ||
|name=rawequal | |name=rawequal | ||
|shortdesc=Compare two tables, bypassing metamethods | |shortdesc=Compare two tables, bypassing metamethods | ||
Revision as of 04:50, 13 February 2020
I CAUSED MAYHEM ON BTN AND LUA
rawequal( tbl1, tbl2 )
- Compare two tables, bypassing metamethods
- tbl1
-
- A table to compare.
- tbl2
-
- Another table to compare.
When creating things like custom containers and objects, one often overrides the __eq metamethod with custom code, possibly to to do deep comparisons or to omit certain elements, but might then need to check for regular equality without going through that override. This can be done with rawequal().