std-strcmp, std-stricmp


Synopsis

(std-strcmp <substr> <str> ) ;case sensitive

(std-stricmp <substr> <str>) ;case insensitive

Description

STD-STRCMP returns T if the substring is the first part of the string or nil if not.

STD-STRICMP converts both arguments to uppercase before the comparison.

Note

STD-STRICMP is dependent on the current stdlib codepage, which defaults to "iso8859-1". This will only affect characters above (CHR 127).

Examples

(std-strcmp  "Test" "Te")      => T
(std-stricmp "Test" "TEST")    => T
(std-strcmp  "Test" "1Test")   => nil
(std-strcmp  "Test1" "1")      => nil

Arguments

str,substr: strings

Return Value

T or nil.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR