Autor Beitrag
CrOc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48

Win XP
D5 Standard
BeitragVerfasst: So 28.12.03 19:59 
hi,
gibt es einen befehl der alle buchstaben in einen string groß bzw. klein schreiben lässt?
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 28.12.03 20:18 
Suche in: Delphi-Forum, Delphi-Library ANSILOWERCASE und Suche in: Delphi-Forum, Delphi-Library ANSIUPPERCASE sollten Dir weiterhelfen.

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
FAlter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 192

Win XP Home
Turbo Delphi 2006 (Win32), C# (VS 2008 Prof.), Java (Eclipse), PHP
BeitragVerfasst: Do 01.01.04 22:54 
Wenn du eine vom Sprachtreiber unabhängige Funktion willst, nimm Suche in: Delphi-Forum, Delphi-Library UPPERCASE und Suche in: Delphi-Forum, Delphi-Library LOWERCASE, aber dann werden äöü nicht beachtet.
G-man
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 258

Win 2000, Win ME, SuSE 8.2
D5 Standard, D6 Professional
BeitragVerfasst: Di 06.01.04 16:55 
Das ist doch aber wohl der falsche Thread in der Multimediasparte...

_________________
...To err is human, but to really foul things up requires a computer.
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 22.01.04 03:08 
...und wie geht das mit einzelnem Buchstaben ???
ich will überprüfen ob ein Buchstabe gross oder klein ist !
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
Zeichen_text := Hallo !
if AnsiLowercase(Zeichen_text[1]) do
  showmessage('klein')
else
  showmessage('gross');

...geht das so ?

Jagg !

Moderiert von user profile iconPeter Lustig: Code- durch Delphi-Tags ersetzt
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 22.01.04 03:29 
Hilfe hilft:
Delphi-Hilfe hat folgendes geschrieben:

AnsiLowerCase returns a string that is a copy of the given string converted to lower case

So wird es also nicht gehen. Ich würde die Position in der ASCII Tabelle nehmen. Auf die Schnelle habe ich auch keine Funktion in der Hilfe gefunden.
Chatfix
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1583
Erhaltene Danke: 10

Win 10, Win 8, Win 7, Win Vista, Win XP
VB.net (VS 2015), MsSQL (T-SQL), HTML, CSS, PHP, MySQL
BeitragVerfasst: Do 22.01.04 09:17 
Machs doch so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
if DeinString[1] = UpperCase(DeinString[1]) then
  ShowMessage('groß')
else
  ShowMessage('klein');

_________________
Gehirn: ein Organ, mit dem wir denken, daß wir denken. - Ambrose Bierce


Zuletzt bearbeitet von Chatfix am Do 22.01.04 09:17, insgesamt 1-mal bearbeitet
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 22.01.04 09:17 
Auf die Schnelle und ohne Gewähr:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Zeichen_text := 'Hallo!';

for i := 1 to length(Zeichen_text) do
begin
  if(Zeichen_text[i] in['a'..'z','ä','ö','ü','ß']) then
    ShowMessage('kleiner Buchstabe')
  else if(Zeichen_text[i] in['A'..'Z','Ä','Ö','Ü']) then
    ShowMessage('großer Buchstabe')
  else
    ShowMessage('alles mögliche, aber wohl kein Buchstabe');
end;