| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Removes duplicate characters from a string and sorts the result.
CharSList( <cString> ) --> cSortedList
The function is a combination of CharList() and CharSort(), i.e. it removes all duplicate characters from the input string and returns the sorted result.
| See also: | CharHist(), CharList(), CharNoList(), CharSort() |
| Category: | CT:String manipulation , Character functions , xHarbour extensions |
| Source: | ct\misc1.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example comperes results of CharSList() and CharList()
PROCEDURE Main
LOCAL cString1 := "xHarbour compiler"
LOCAL cString2 := "bbbccccaa"
? CharList( cString1 ) // result: xHarbou cmpile
? CharSList( cString1 ) // result: Habceilmoprux
? CharList( cString2 ) // result: bca
? CharSList( cString2 ) // result: abc
RETURN
http://www.xHarbour.com