StringConcatenate

Geçirilen parametrelerden bir dizgi şekillendirir ve şekillendirilen dizginin büyüklüğüne dönüş yapar. Parametreler herhangi bir tipte olabilirler. Parametreler 2'den az veya 64'ten fazla olamaz.

int  StringConcatenate(
   string&  string_var,   // şekillendirilecek dizgi
   void argument1         // herhangi bir basit tipteki ilk parametre
   void argument2         // herhangi bir basit tipteki ikinci parametre
   ...                    // herhangi bir basit tipteki sonraki parametre
   );

Parametreler

string_var

[out]  Birleştirme yoluyla şekillendirilecek dizgi.

argumentN

[in]  Virgülle ayrılmış değerler. 2 ile 63 adet arasında basit tipli parametreler.

Dönüş değeri

Parametrelerin birleştirilmesi ve string tipine dönüştürülmesiyle elde edilen dizginin uzunluğu. Parametreler, Print() ve Comment() fonksiyonlarında kullanılan aynı kurallarla dönüştürülürler.

Örnek:

void OnStart()
  {
//--- birleştirme işlemine katılan değişkenleri bildir ve tanımla
   string text="";
   string text1="This script shows how the StringConcatenate() function works.\n";
   string text2="This is the second line, at the end of which there is a line break control code.\n";
   string text3="This is line number ";
   int    num3=3;
   string text31=", the number of which is entered into the function as a separate parameter.";
   string textN="\n";
   string text4="This is line number 4, preceded by a separate parameter with a line break code.";
   int    length=StringConcatenate(texttext1text2text3num3text31textNtext4"\nLine 5 includes a real number: "0.12345);
   Print(text"\nLength of the resulting string = "length);
   
  /*
  Sonuç
   This script shows how the StringConcatenate() function works.
   This is the second lineat the end of which there is a line break control code.
   This is line number 3the number of which is entered into the function as a separate parameter.
   This is line number 4preceded by a separate parameter with a line break code.
   Line 5 includes a real number0.12345
   Length of the resulting string = 358
  */
  }

Ayrıca Bakınız

StringAdd, StringSplit, StringSubstr