FILUM
File Utilities
FILUM,
a MATLAB library which
handles information in text files.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
FILUM is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
FILE_INCREMENT,
a MATLAB program which
makes a copy of a file containing an integer array, after incrementing
each entry by a given value.
FILE_NAME_SEQUENCE,
a MATLAB program which
demonstrates four ways to generate a sequence of filenames.
filum_test
Reference:
-
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Springer Verlag, pages 201-202, 1983.
-
Tom Christiansen, Nathan Torkington,
"8.6: Picking a Random Line from a File",
Perl Cookbook, pages 284-285,
O'Reilly, 1999.
-
Pierre L'Ecuyer,
Random Number Generation,
in Handbook of Simulation,
edited by Jerry Banks,
Wiley Interscience, page 95, 1998.
-
Bennett Fox,
Algorithm 647:
Implementation and Relative Efficiency of Quasirandom
Sequence Generators,
ACM Transactions on Mathematical Software,
Volume 12, Number 4, pages 362-376, 1986.
-
Philip Lewis, Allen Goodman, James Miller,
A Pseudo-Random Number Generator for the System/360,
IBM Systems Journal,
Volume 8, pages 136-143, 1969.
Source Code:
-
ch_cap.m,
capitalizes a character;
-
ch_eqi.m,
returns true if two characters are equal, ignoring case;
-
ch_index_last.m,
returns the index of the last occurrence of a character in a string.
-
ch_is_digit.m,
returns true if a character is a decimal digit;
-
ch_low.m,
lowercases a character;
-
ch_to_digit.m,
converts a character to a decimal digit;
-
ch_to_rot13.m,
converts a character to its ROT13 equivalent;
-
digit_dec.m,
decrements a decimal digit;
-
digit_inc.m,
increments a decimal digit;
-
digit_to_ch.m,
converts a decimal digit to a character;
-
file_char_count.m,
counts the number of characters in a file;
-
file_column_count.m,
counts the number of columns in the first line of a file;
-
file_delete.m,
deletes a file;
-
file_exist.m,
is true if a file exists;
-
file_line_uniform.m,
returns a random line from a file;
-
file_line_width.m,
returns the length of the longest line in a file;
-
file_name_dec.m,
"decrements" a partially numeric filename;
-
file_name_ext_get.m,
gets the extension of a filename;
-
file_name_ext_swap.m,
replaces the current extension of a filename;
-
filename_inc.m,
"increments" a partially numeric filename;
-
file_name_inc_nowrap.m,
"increments" a partially numeric filename,
and "wrapping" is not allowed;
-
file_para_count.m,
counts the number of paragraphs in a file;
-
file_row_count.m,
counts the number of rows in a file;
-
file_sequence_delete.m,
deletes a file sequence.
-
file_sequence_read.m,
reads the data from a file sequence.
-
file_sequence_size.m,
sizes a file sequence.
-
file_tag_check.m,
makes a generalized parenthesis check on the text of a file;
-
file_unique.m,
makes a copy of the unique lines of a sorted file;
-
file_word_count.m,
counts the number of words in a file;
-
i4_uniform_ab.m,
returns a scaled pseudorandom I4;
-
number_inc.m,
increments the integer represented by a string;
-
r4_uniform_01.m,
returns a unit pseudorandom R4;
-
r8_uniform_01.m,
returns a unit pseudorandom R8;
-
s_adjustl.m,
shifts a string to the left, "squeezing out" the leading blanks.
-
s_cat.m,
concatenates two strings;
-
s_eqi.m,
is true if two strings are equal, disregarding case;
-
s_index.m,
returns the index of the first occurrence of a substring in a string.
-
s_len_trim.m,
returns the length of a string to the last nonblank;
-
s_low.m,
makes a lowercase copy of a string;
-
s_reverse.m,
reverses a string;
-
s_to_r8.m,
reads an R8 from a string;
-
s_to_r8vec.m,
reads an R8VEC from a string;
-
s_to_rot13.m,
converts a string to its ROT13 equivalent;
-
s_word_count.m,
counts the number of "words" in a string;
-
timestamp.m,
prints the HMSDMY date as a timestamp;
Last revised on 21 January 2019.