Skip to content

Commit

Permalink
comments in the vint nativeString module
Browse files Browse the repository at this point in the history
  • Loading branch information
tacheraSasi committed Nov 28, 2024
1 parent 2ddfd18 commit df86e6b
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions vintLang/nativeStrings.vint
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
// Define the variable 'name' and assign the string "Tachera Sasi" to it
name = "Tachera Sasi"

print(name.split(""))
print(name.reverse())
print(name.len())
print(name.upper())
print(name.lower())
print(name.upper())
// Split the string into an array of characters and print the result
print(name.split(""))

// Reverse the string and print the result
print(name.reverse())

// Get the length of the string and print it
print(name.len())

// Convert the string to uppercase and print it
print(name.upper())

// Convert the string to lowercase and print it
print(name.lower())

// Check if the string contains the substring "sasi" (case-sensitive) and print the result
print(name.contains("sasi"))

// Convert the string to uppercase and check if it contains the substring "SASI" (case-sensitive), then print the result
print(name.upper().contains("SASI"))

// Replace the substring "Sasi" with "Vint" and print the result
print(name.replace("Sasi", "Vint"))

// Trim any occurrence of the character "a" from the start and end of the string and print the result
print(name.trim("a"))

0 comments on commit df86e6b

Please sign in to comment.