Earlier versions of the Linux kernel added a NULL byte to the end of the
SSID to enable easy printing of the SSID on the console or in a terminal,
but this behavior was problematic (SSIDs are simply byte arrays, not strings)
and thus was changed. This function compensates for that behavior at the
cost of some compatibility with odd SSIDs that may legitimately have trailing
NULLs, even though that is functionally pointless.
Parameters
ssid1: string|Uint8Array<ArrayBufferLike>
the first SSID to compare
ssid2: string|Uint8Array<ArrayBufferLike>
the second SSID to compare
ignore_trailing_null: boolean
true to ignore one trailing NULL byte
Returns boolean
true if the SSIDs are the same, false if they are not
Earlier versions of the Linux kernel added a NULL byte to the end of the SSID to enable easy printing of the SSID on the console or in a terminal, but this behavior was problematic (SSIDs are simply byte arrays, not strings) and thus was changed. This function compensates for that behavior at the cost of some compatibility with odd SSIDs that may legitimately have trailing NULLs, even though that is functionally pointless.