src/ucx/string.h

changeset 364
5577d6c27a33
parent 363
8175ba2b3bcb
child 378
952c2df7e7ac
equal deleted inserted replaced
363:8175ba2b3bcb 364:5577d6c27a33
936 * @return 1, if and only if the string has the specified suffix, 0 otherwise 936 * @return 1, if and only if the string has the specified suffix, 0 otherwise
937 */ 937 */
938 #define sstrsuffix(string, suffix) scstrsuffix(SCSTR(string), SCSTR(suffix)) 938 #define sstrsuffix(string, suffix) scstrsuffix(SCSTR(string), SCSTR(suffix))
939 939
940 /** 940 /**
941 * Checks, if a string has a specific prefix, ignoring the case.
942 *
943 * @param string the string to check
944 * @param prefix the prefix the string should have
945 * @return 1, if and only if the string has the specified prefix, 0 otherwise
946 */
947 int scstrcaseprefix(scstr_t string, scstr_t prefix);
948
949 /**
950 * Checks, if a string has a specific prefix, ignoring the case.
951 *
952 * @param string the string to check
953 * @param prefix the prefix the string should have
954 * @return 1, if and only if the string has the specified prefix, 0 otherwise
955 */
956 #define sstrcaseprefix(string, prefix) \
957 scstrcaseprefix(SCSTR(string), SCSTR(prefix))
958
959 /**
960 * Checks, if a string has a specific suffix, ignoring the case.
961 *
962 * @param string the string to check
963 * @param suffix the suffix the string should have
964 * @return 1, if and only if the string has the specified suffix, 0 otherwise
965 */
966 int scstrcasesuffix(scstr_t string, scstr_t suffix);
967
968 /**
969 * Checks, if a string has a specific suffix, ignoring the case.
970 *
971 * @param string the string to check
972 * @param suffix the suffix the string should have
973 * @return 1, if and only if the string has the specified suffix, 0 otherwise
974 */
975 #define sstrcasesuffix(string, suffix) \
976 scstrcasesuffix(SCSTR(string), SCSTR(suffix))
977
978 /**
941 * Returns a lower case version of a string. 979 * Returns a lower case version of a string.
942 * 980 *
943 * This function creates a duplicate of the input string, first 981 * This function creates a duplicate of the input string, first
944 * (see scstrdup()). 982 * (see scstrdup()).
945 * 983 *

mercurial