Skip to content

luciaondovcik/File-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

File sort

Program has 3 positional parameters:

  • Path to input file
  • Path to output file
  • One of the words (dec, hex, bin, str, vec)

Program sorts the lines of the file from the smallest to the largest according to the last parameter. Numbers are sorted by value. Since we have different representations of the same number (+3 and 3 or 0x0001 and 0x1), the original representation of the given number is written in the resulting file. Types:

dec

Lines are numbers from the range int32_t.

hex

Lines are hexadecimal numbers with the prefix 0x from the max range uint32_t.

bin

Lines are binary numbers (without prefix) from the max range uint32_t.

str

Lines are string types, sorting is lexicographically (operator<).

vec

Lines are numbers in decimal (int32_t) separated by a comma. They represents vectors of numbers. Program sorts them by length, in case of the same length by numbers.
Example of line: 121,4,5,70,0,-1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages