1
2
3
4
5
6
7
8
9
|
------------------------------------------------------------------------------
-- Copyright (c) 2013-2016, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
|
|
|
1
2
3
4
5
6
7
8
9
|
------------------------------------------------------------------------------
-- Copyright (c) 2013-2017, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
Null_Slice : constant Slice;
--------------------------
-- Conversion functions --
--------------------------
function To_Slice (S : String) return Slice;
-- Create a new slice containing the whole given string
function To_String (S : Slice) return String;
-- Return the string represented by the slice
|
>
>
>
>
>
>
>
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
Null_Slice : constant Slice;
--------------------------
-- Conversion functions --
--------------------------
function New_Slice
(First : Positive;
Last : Natural;
Initialize : not null access procedure (S : out String))
return Slice;
-- Create a callback-initialized slice
function To_Slice (S : String) return Slice;
-- Create a new slice containing the whole given string
function To_String (S : Slice) return String;
-- Return the string represented by the slice
|