Function lessThan [src]

Returns true if lhs < rhs, false otherwise

Prototype

pub fn lessThan(comptime T: type, lhs: []const T, rhs: []const T) bool

Parameters

T: typelhs: []const Trhs: []const T

Example

test lessThan { try testing.expect(lessThan(u8, "abcd", "bee")); try testing.expect(!lessThan(u8, "abc", "abc")); try testing.expect(lessThan(u8, "abc", "abc0")); try testing.expect(!lessThan(u8, "", "")); try testing.expect(lessThan(u8, "", "a")); }

Source

pub fn lessThan(comptime T: type, lhs: []const T, rhs: []const T) bool { return order(T, lhs, rhs) == .lt; }