Shell String Handling Functions

This section describes the Windows Shell string handling functions. The programming elements explained in this documentation are exported by Shlwapi.dll and defined in Shlwapi.h and Shlwapi.lib.

In this section

Topic Description
ChrCmpI
Performs a comparison between two characters. The comparison is not case-sensitive.
GetAcceptLanguages
Retrieves a string used with websites when specifying language preferences.
IntlStrEqN
Performs a case-sensitive comparison of a specified number of characters from the beginning of two localized strings.
IntlStrEqNI
Performs a case-insensitive comparison of a specified number of characters from the beginning of two localized strings.
IntlStrEqWorker
Compares a specified number of characters from the beginning of two localized strings.
IsCharSpace
Determines whether a character represents a space.
SHLoadIndirectString
Extracts a specified text resource when given that resource in the form of an indirect string (a string that begins with the '@' symbol).
SHStrDup
Makes a copy of a string in newly allocated memory.
StrCat
Appends one string to another.
Note: Do not use. See Remarks for alternative functions.
StrCatBuff
Copies and appends characters from one string to the end of another.
Note: Do not use. See Remarks for alternative functions.
StrCatChainW
Concatenates two Unicode strings. Used when repeated concatenations to the same buffer are required.
StrChr
Searches a string for the first occurrence of a character that matches the specified character. The comparison is case-sensitive.
StrChrI
Searches a string for the first occurrence of a character that matches the specified character. The comparison is not case-sensitive.
StrChrNIW
Searches a string for the first occurrence of a specified character. The comparison is not case-sensitive.
StrChrNW
Searches a string for the first occurrence of a specified character. The comparison is case-sensitive.
StrCmp
Compares two strings to determine if they are the same. The comparison is case-sensitive.
StrCmpC
Compares strings using C run-time (ASCII) collation rules. The comparison is case-sensitive.
StrCmpI
Compares two strings to determine if they are the same. The comparison is not case-sensitive.
StrCmpIC
Compares two strings using C run-time (ASCII) collation rules. The comparison is not case-sensitive.
StrCmpLogicalW
Compares two Unicode strings. Digits in the strings are considered as numerical content rather than text. This test is not case-sensitive.
StrCmpN
Compares a specified number of characters from the beginning of two strings to determine if they are the same. The comparison is case-sensitive. The StrNCmp macro differs from this function in name only.
StrCmpNC
Compares a specified number of characters from the beginning of two strings using C run-time (ASCII) collation rules. The comparison is case-sensitive.
StrCmpNI
Compares a specified number of characters from the beginning of two strings to determine if they are the same. The comparison is not case-sensitive. The StrNCmpI macro differs from this function in name only.
StrCmpNIC
Compares a specified number of characters from the beginning of two strings using C run-time (ASCII) collation rules. The comparison is not case-sensitive.
StrCpy
Copies one string to another.
Note: Do not use. See Remarks for alternative functions.
StrCpyN
Copies a specified number of characters from the beginning of one string to another.
Note: Do not use this function or the StrNCpy macro. See Remarks for alternative functions.
StrCSpn
Searches a string for the first occurrence of any of a group of characters. The search method is case-sensitive, and the terminating NULL character is included within the search pattern match.
StrCSpnI
Searches a string for the first occurrence of any of a group of characters. The search method is not case-sensitive, and the terminating NULL character is included within the search pattern match.
StrDup
Duplicates a string.
StrFormatByteSize64
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
StrFormatByteSizeA
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size. Differs from StrFormatByteSizeW in one parameter type.
StrFormatByteSizeEx
Converts a numeric value into a string that represents the number in bytes, kilobytes, megabytes, or gigabytes, depending on the size. Extends StrFormatByteSizeW by offering the option to round to the nearest displayed digit or to discard undisplayed digits.
StrFormatByteSizeW
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size. Differs from StrFormatByteSizeA in one parameter type.
StrFormatKBSize
Converts a numeric value into a string that represents the number expressed as a size value in kilobytes.
StrFromTimeInterval
Converts a time interval, specified in milliseconds, to a string.
StrIsIntlEqual
Compares a specified number of characters from the beginning of two strings to determine if they are equal.
StrNCat
Appends a specified number of characters from the beginning of one string to the end of another.
Note: Do not use this function or the StrCatN macro. See Remarks for alternative functions.
StrPBrk
Searches a string for the first occurrence of a character contained in a specified buffer. This search does not include the terminating null character.
StrRChr
Searches a string for the last occurrence of a specified character. The comparison is case-sensitive.
StrRChrI
Searches a string for the last occurrence of a specified character. The comparison is not case-sensitive.
StrRetToBSTR
Accepts a STRRET structure returned by IShellFolder::GetDisplayNameOf that contains or points to a string, and returns that string as a BSTR.
StrRetToBuf
Converts an STRRET structure returned by IShellFolder::GetDisplayNameOf to a string, and places the result in a buffer.
StrRetToStr
Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer to an allocated string containing the display name.
StrRetToStrN
Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf, converts it to a string, and places the result in a buffer.
StrRStrI
Searches for the last occurrence of a specified substring within a string. The comparison is not case-sensitive.
StrSpn
Obtains the length of a substring within a string that consists entirely of characters contained in a specified buffer.
StrStr
Finds the first occurrence of a substring within a string. The comparison is case-sensitive.
StrStrI
Finds the first occurrence of a substring within a string. The comparison is not case-sensitive.
StrToInt
Converts a string that represents a decimal value to an integer. The StrToLong macro is identical to this function.
StrToInt64Ex
Converts a string representing a decimal or hexadecimal value to a 64-bit integer.
StrToIntEx
Converts a string representing a decimal or hexadecimal number to an integer.
StrTrim
Removes specified leading and trailing characters from a string.
wnsprintf
Takes a variable-length argument list and returns the values of the arguments as a printf-style formatted string.
Note: Do not use this function. See Remarks for alternative functions.
wvnsprintf
Takes a list of arguments and returns the values of the arguments as a printf-style formatted string.
Note: Do not use this function. See Remarks for alternative functions.