INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Supplies some additional string service"
project: "The Universal Simple Formatting Library (USFL)"
copyright: "Eiffel-forum free licence with permission from Object Tools"
author: "Andy Malakov and Igor Nesterof"
version: "1.2"
cluster: formats
class G_STRING_TOOLS
feature

fill_string (nr_blanks: INTEGER; pc: CHARACTER): STRING

left_pad (s: STRING; pc: CHARACTER; l: INTEGER): STRING

right_pad (s: STRING; pc: CHARACTER; l: INTEGER): STRING

center_pad (s: STRING; pc: CHARACTER; l: INTEGER): STRING

pad_string (s: STRING; pc: CHARACTER; l: INTEGER; from_left: BOOLEAN): STRING

cut_here (s: STRING; fin_len: INTEGER): STRING
-- make string not more then fin_len characters
require
positive_len: fin_len >= 0

strip_zeros (s: STRING): STRING
-- strip trailing 0's

ifc (b: BOOLEAN; t, f: CHARACTER): CHARACTER
-- C-like style ? : operator

is_digit (s: STRING; indx: INTEGER): BOOLEAN

is_letter (s: STRING; indx: INTEGER): BOOLEAN

index (s: STRING; pc: CHARACTER): INTEGER
-- return pc position or zero if it not found
require
s /= void

contain (s: STRING; pc: CHARACTER): BOOLEAN

x_substring (s: STRING; from_index: INTEGER; to_index: INTEGER): STRING
-- extend substring with empty string
require
sub_interval: 1 <= from_index and then from_index <= to_index + 1 and then to_index <= s.count
ensure
Result /= void

find_itself (s: STRING; list: ARRAY [STRING]): INTEGER
-- find s in strings list

Zero: CHARACTER

x_s2i (s: STRING): INTEGER
-- convert without checking
require
s /= void

x_append (s, other: STRING)

x_extend (s: STRING; c: CHARACTER)

x_adapt (s, other: STRING)

x_prepend (s, other: STRING)
end -- class G_STRING_TOOLS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES