xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

CharSList()

Removes duplicate characters from a string and sorts the result.

Syntax

CharSList( <cString> ) --> cSortedList

Arguments

<cString>
This is the character string to process.

Return

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.

Info

See also:CharHist(), CharList(), CharNoList(), CharSort()
Category: CT:String manipulation , Character functions , xHarbour extensions
Source:ct\misc1.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe