Jump to content
Forum Roportal
vulpoiul

Intrebare Delphi (string)

Rate this topic

Recommended Posts

Cum se poate introduce intr'un string caracterul ' ??

Deci ceva de genu string := ' bla bla' bla bla';

Mersi Mult

string:="bla bla' bla bla";

 

 

sau daca vrei sa scrii "

string:='bla bla" bla bla'

 

din cate mai tin eu minte....

Share this post


Link to post
Share on other sites
string:="bla bla' bla bla";

sau daca vrei sa scrii "

string:='bla bla" bla bla'

 

din cate mai tin eu minte....

 

 

Pai nu pot sa pun " pentru a determina un string ca'mi da caracter ilegal in input file,

si deci string := " bla ' bla "; nu tine.

Se poate in delphi definii un string in afara de caracterele 'string' ???

 

Mersi

Share this post


Link to post
Share on other sites

insereaza in string caracterul ' de 2 ori pentru a fi concatenat (si a nu fi considerat sfarsit de string)

sau concateneaza #39 (echivalentul ASCII al lui ' )

exemplu

MyString:='that''s it';

sau

MyString:='that'#39's it';

Share this post


Link to post
Share on other sites

Ai in delphi functiile:

Concat()-Concat(s1 [, s2,..., sn]: string): string;

si copy()-function Copy(S; Index, Count: Integer): string;

 

In continuare cred ca doar astea doua iti trebuie si un lic de lectura

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×