.. highlightlang:: us .. _mem_compare: mem_compare =========== .. index:: mem_compare .. us.tag mem_compare ENGLISH New420 mem :ref:`mem_compare` compares two strings or string matrices which may contain 0-characters. .. function:: nRet = mem_compare(string1, string2) .. us.return **Return Value** *nRet* is -1, if string1 < string2, 0 if string1 is equal to string2 and 1, if string1 > string2.If string1 and string2 are vectors or matrices *nRet* is a real vector or read matrix. .. us.params **Parameters** .. uparam:: string1 *string1* is a scalar string or a string matrix. .. uparam:: string2 *string2* is a scalar string or a string matrix. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 4.2.0 - New .. seealso:: :ref:`overview-strings`, :ref:`mem_len` :sub:`id-2054430`