STRINGS

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

string

is a sequential collection of characters that is used to represent text. In C#, a string is an object of class string in the System namespace.

2
New cards

backslash (\)

is used to escape characters with special use, such as newline (\n)

3
New cards

'@' symbol

is used to ignore the special use of backslashes.

4
New cards

char

This property is used to get the character at a specified index position of a string.

5
New cards

Length

This property is used to get the total number of characters in the string.

6
New cards

bool Contains(string value)

This returns true if the specified substring occurs within the string object; otherwise, it returns false.

7
New cards

bool Equals(string value, StringComparison comparisonType)

This determines whether the specified substring has the same value with the string object

8
New cards

int IndexOf(char value)

This returns the index position value of the first occurrence of the specified character within the string object if that character is found; otherwise, it returns -1 if not found.

9
New cards

string Replace(char oldValue, char newValue)

This returns a copy of the string object except that all of the occurrences of an old character are replaced with a new character.

10
New cards

string ToString()

This returns a converted copy of object as a string.

11
New cards

string ToLower()

This returns a copy of the string object converted to lowercase.

12
New cards

string ToUpper()

This returns a copy of the string object converted to uppercase.

13
New cards

immutable

This means that when a string object is created, its contents cannot be changed.

14
New cards

StringBuilder class

represents a mutable string of characters that allows the user to expand the number of characters in the string object without allocating additional memory space.

15
New cards

Append

This appends a copy of the specified substring to the StringBuilder object.

16
New cards

Equals

This returns true if the specified substring is equal to the StringBuilder object; otherwise, it returns false

17
New cards

Clear()

This removes all characters from the current StringBuilder object.

18
New cards

Replace

This replaces all occurrence of a specified old character of the StringBuilder object with a new character.

19
New cards

ToString()

This converts the value of the StringBuilder object to a string.