comparison gcc/ada/libgnat/s-casuti.adb @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
4 -- -- 4 -- --
5 -- S Y S T E M . C A S E _ U T I L -- 5 -- S Y S T E M . C A S E _ U T I L --
6 -- -- 6 -- --
7 -- B o d y -- 7 -- B o d y --
8 -- -- 8 -- --
9 -- Copyright (C) 1995-2017, AdaCore -- 9 -- Copyright (C) 1995-2018, AdaCore --
10 -- -- 10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under -- 11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- -- 12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- 13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
56 for J in A'Range loop 56 for J in A'Range loop
57 A (J) := To_Lower (A (J)); 57 A (J) := To_Lower (A (J));
58 end loop; 58 end loop;
59 end To_Lower; 59 end To_Lower;
60 60
61 function To_Lower (A : String) return String is
62 Result : String := A;
63 begin
64 To_Lower (Result);
65 return Result;
66 end To_Lower;
67
61 -------------- 68 --------------
62 -- To_Mixed -- 69 -- To_Mixed --
63 -------------- 70 --------------
64 71
65 procedure To_Mixed (A : in out String) is 72 procedure To_Mixed (A : in out String) is
73 A (J) := To_Lower (A (J)); 80 A (J) := To_Lower (A (J));
74 end if; 81 end if;
75 82
76 Ucase := A (J) = '_'; 83 Ucase := A (J) = '_';
77 end loop; 84 end loop;
85 end To_Mixed;
86
87 function To_Mixed (A : String) return String is
88 Result : String := A;
89 begin
90 To_Mixed (Result);
91 return Result;
78 end To_Mixed; 92 end To_Mixed;
79 93
80 -------------- 94 --------------
81 -- To_Upper -- 95 -- To_Upper --
82 -------------- 96 --------------
100 for J in A'Range loop 114 for J in A'Range loop
101 A (J) := To_Upper (A (J)); 115 A (J) := To_Upper (A (J));
102 end loop; 116 end loop;
103 end To_Upper; 117 end To_Upper;
104 118
119 function To_Upper (A : String) return String is
120 Result : String := A;
121 begin
122 To_Upper (Result);
123 return Result;
124 end To_Upper;
125
105 end System.Case_Util; 126 end System.Case_Util;