The code works perfectly in this context, thanks Majlumbo..the
first character in a string can be easily isolated. The problem though is
if the string has two names, how do I get the first character of each name.
Let me try and show it this way
---------------
var
X: String;
begin
x:=Edit1.Text...
I thought it was an obvious thing also, but it turns out that:
Result := Result + copy(SL[I][1]) are not enough actual parameters, so says
the compiler, I m wondering how are we going to make this work.
Dear majlumbo, it seems I have jumped a gun, I thought we have everything in the bag,
however this code :{ Result := Result + copy(SL[I][0]);}
produces the { element 0 not accessible error} it further says use Setlength or Length ....do you have a way out? I am so sorry after
testing the last...
Majlumbo, thanks a lot for this great code, however I am
getting errors on the indicated places
SL := TStringList.Create;
try
Result := '';
SL.Text := ReplaceText(Value, ' ', #13#10); {Replace.text}
for I := 0 to SL.Count - 1 do
Result := Result + copy(SL[I][0])...
I m still using Delphi 6, is there anyone out there who can help me out here, I need a procedure where I can copy the first character in a string and the first character in the substring of the very string. I using this to create initials if more than one name is entered in a TEdit.text. I have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.