Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

collator_sort_with_sort_keys(3) [php man page]

COLLATOR_SORT_WITH_SORT_KEYS(3) 					 1					   COLLATOR_SORT_WITH_SORT_KEYS(3)

Collator::sortWithSortKeys - Sort array using specified collator and sort keys

	Object oriented style

SYNOPSIS
public bool Collator::sortWithSortKeys (array &$arr) DESCRIPTION
Procedural style bool collator_sort_with_sort_keys (Collator $coll, array &$arr) Similar to collator_sort(3) but uses ICU sorting keys produced by ucol_getSortKey() to gain more speed on large arrays. PARAMETERS
o $coll -Collator object. o $arr -Array of strings to sort RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 collator_sort_with_sort_keys(3) example <?php $arr = array( 'Kopfe', 'Kypper', 'Kopfe' ); $coll = collator_create( 'sv' ); collator_sort_with_sort_keys( $coll, $arr ); var_export( $arr ); ?> The above example will output: array ( 0 => 'Kopfe', 1 => 'Kypper', 2 => 'Kopfe', ) SEE ALSO
Collator constants, collator_sort(3), collator_asort(3). PHP Documentation Group COLLATOR_SORT_WITH_SORT_KEYS(3)

Check Out this Related Man Page

COLLATOR_GET_LOCALE(3)							 1						    COLLATOR_GET_LOCALE(3)

Collator::getLocale - Get the locale name of the collator

	Object oriented style

SYNOPSIS
public string Collator::getLocale (int $type) DESCRIPTION
Procedural style string collator_get_locale (Collator $coll, int $type) Get collector locale name. PARAMETERS
o $coll -Collator object. o $type - You can choose between valid and actual locale ( Locale::VALID_LOCALE and Locale::ACTUAL_LOCALE, respectively). RETURN VALUES
Real locale name from which the collation data comes. If the collator was instantiated from rules or an error occurred, returns boolean FALSE. EXAMPLES
Example #1 collator_get_locale(3) example <?php $coll = collator_create( 'en_US_California' ); $res_val = collator_get_locale( $coll, Locale::VALID_LOCALE ); $res_act = collator_get_locale( $coll, Locale::ACTUAL_LOCALE ); printf( "Valid locale name: %s Actual locale name: %s ", $res_val, $res_act ); ?> The above example will output: Requested locale name: en_US_California Valid locale name: en_US Actual locale name: en SEE ALSO
collator_create(3). PHP Documentation Group COLLATOR_GET_LOCALE(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK help please

Hi, I have two files each with different record seperators, one with a pipe | and the other with a semi-colon ; How do you deal with this in awk? Any help appreciated specifically i need to change the RS to ; when the following statement operates on the second file (assets.dat) awk... (7 Replies)
Discussion started by: penfold
7 Replies

2. UNIX for Advanced & Expert Users

awk problems

awk ' FILENAME=="First"{ arr = 1; x=sub ; } FILENAME=="Second"{ if (/^10/ &&... (5 Replies)
Discussion started by: Ehab
5 Replies

3. UNIX for Dummies Questions & Answers

to assign cut values to an array

i need to seperate values seperated by delimiters and assign it to an array.. can u plz help me on that. Variables = "asd,rgbh,(,rty,got,),sroe,9034," i need to assign the variables into arrays.. like.. var=asd var=rgbh.. and so on how do i do this. i need to reuse the values stored in... (6 Replies)
Discussion started by: Syms
6 Replies

4. UNIX for Advanced & Expert Users

Sort on two keys

Hello, I am trying to sort a text file by two keys but the second key should be reversed. I have tried -nt '|' -k 4 -rk 5 but it just sorts reversed on key 4. Does anyone have any suggestions ? Thanks (8 Replies)
Discussion started by: clarcombe
8 Replies

5. Shell Programming and Scripting

Extraction of the output from a string.

Hi Everyone, I stored the result of a certain awk script in the variable arr.The result is /inets /banking /tools. arr= /inets /banking /tools These are 3 direcctories. I should be able to move in to these directories using "cd" command.Can you tell me how to extract... (5 Replies)
Discussion started by: saicharantej
5 Replies

6. Shell Programming and Scripting

awk script to split field data

Hi Experts, I have a Input.txt document which contains data fields seperated by tabs. There are 4 fields totally Named UNIQUE, ORDER, CONTACT and WINS. The UNIQUE field contains unique ID and the CONTACT field contains data seperated by comma in some records. I am looking to write an awk script... (12 Replies)
Discussion started by: forumthreads
12 Replies

7. Shell Programming and Scripting

help - exec time too long

Dear everyone... thanks to this forum I am able to do everyday more and more complex scripts...but now I come up with problem with optimisation.. problem 1 - optimise: here is my code: while read number do nawk -F "|" -v... (8 Replies)
Discussion started by: abdulaziz
8 Replies

8. Shell Programming and Scripting

Perl and string array problem

#!/usr/bin/perl my @arr=("hello", "how", "are", "you"); $l=length(@arr); print $l; This print 1.Why? How can i print the array size = 4? I want to store these in an array. hello how are you And then i want to access these element through indexing. How can i do this? (4 Replies)
Discussion started by: cola
4 Replies

9. Shell Programming and Scripting

Using unix array in sql

Hi all, I have declared an array in unix as below. #!/bin/ksh arr=() for i in {0..4} do arr=$i; done. i want to insert these array variables into the oracle table.can you guys please help me in doing this. my code is as below. value=`sqlplus -s fos/fos << EOF begin for j in... (10 Replies)
Discussion started by: Mukta
10 Replies

10. Shell Programming and Scripting

Data Normalization

Hi, there Need help on rearranging the data. I have data in the following format. LAC = 040 DN = 24001001 EQN = 920- 2- 0- 1 CAT = MS OPTRCL (7 Replies)
Discussion started by: meetsriharsha
7 Replies

11. Programming

Integer array length

Hello; When I wrote a function to print out an array, void p_array(int arr) { int i; int size = sizeof(arr) / sizeof(int); // int size = sizeof (arr) / sizeof (arr); for (i = 0; i < size; i++) printf("%d ", arr); printf("\n"); }I could only print out the... (19 Replies)
Discussion started by: yifangt
19 Replies

12. Shell Programming and Scripting

Replace multiple strings of a file

Hi, I have an array variable "arr" that reads string from a file "vari.txt". Thus, the array will be of variable length depending how many entries are present in "vari.txt" I use a for loop to traverse through the array. vari.txt (in this sample we have 2 entries, but it can have more... (5 Replies)
Discussion started by: mohtashims
5 Replies

13. UNIX for Dummies Questions & Answers

Arrays

Am using bash For eg: Suppose i have a array arr=(1 2 3 4 5 6 7 8 9 10 11 12) suppose i give input 5 to a script and script should able to print values greater than or equal to 5 like below: Input: 5 output: 5,6,7,8,9,10,11,12 (7 Replies)
Discussion started by: manid
7 Replies

14. Shell Programming and Scripting

Multidimensional array:awk error

awk -F'\t' -v OFS='\t' ' { if($2 in arr) { #print "Sahi", NR,arr for(k=2;k<=NF;k++){ # sum]+=$2 } } else { arr=NR #print "awk",NR for (k=3;k<=NF ; k++){ sum=$k } } } (7 Replies)
Discussion started by: genome
7 Replies

15. UNIX for Beginners Questions & Answers

Need a Bash script for iterating thru an array and running a command

Hi , I am a total beginner so bear with me. I have the below code which works . I need to extend it by iterating thru the array arr and executing a command in each loop. some thing on the lines of below. I need to run this in a Jenkins script , so I would need below bash script to run... (6 Replies)
Discussion started by: SVRao19056
6 Replies