🔧 10. String Operations
Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to
a) Quyidagi kod nima qiladi?
string name = "John";
string upperName = name.ToUpper();
Console.WriteLine(upperName);
Natija: JOHN
b) Stringlarni birlashtirishning bir usulini keltiring.
string firstName = "John";
string lastName = "Doe";
string fullName = firstName + " " + lastName;
c) Stringlarni solishtirish uchun string.Compare() yoki Equals() metodi ishlatiladi.
string str1 = "Apple";
string str2 = "Banana";
int result = string.Compare(str1, str2);
Console.WriteLine(result);
Natija: -1 (Apple kichik Banana'dan)
...
🔧 string vs String
📈 18.69 Punkte
🔧 Programmierung
🔧 C Print String – How to Print a String in C
📈 18.69 Punkte
🔧 Programmierung
🐧 SVGZ / XML replacing string with string
📈 18.69 Punkte
🐧 Linux Tipps