Contents

isEqualTo(const OSString *)

Tests the equality of an OSData object to an OSString.

Declaration

virtual bool isEqualTo(
 const OSString *aString) const;

Parameters

  • aString:

    The string object to be compared against the receiver.

Return Value

true if the two objects are equivalent, false otherwise.

Overview

This function compares the bytes of the OSData object against those of the OSString, accounting for the possibility that an OSData might explicitly include a nul character as part of its total length. Thus, for example, an OSData object containing either the bytes <'u', 's', 'b', '\0'> or <'u', 's', 'b'> will compare as equal to the OSString containing "usb".

See Also

Miscellaneous