     XCTAssertTrue(s4.truncate(at: 4) == "a🇮🇹bb…")
     XCTAssertTrue(s4.truncate(at: 5) == "a🇮🇹bb🇮🇹…")
     XCTAssertTrue(s4.truncate(at: 6) == "a🇮🇹bb🇮🇹🇮🇹…")
-
+    
     let s5 = "\u{2126}"
     XCTAssertTrue(s5.truncate(at: 0) == "…")
     XCTAssertTrue(s5.truncate(at: 4) == "Ω")
     XCTAssertTrue(s5.truncate(at: 100) == "Ω")
-
+    
     let s6 = "cafè"
     XCTAssertTrue(s6.truncate(at: 1) == "c…")
     XCTAssertTrue(s6.truncate(at: 4) == "cafè")
-
+    
     let s7 = "👍👍👍👍" // 4 characters
     XCTAssertTrue(s7.truncate(at: 1) == "👍…")
     XCTAssertTrue(s7.truncate(at: 2) == "👍👍…")
     XCTAssertTrue(s7.truncate(at: 3) == "👍👍👍…")
-
+    
     let s8 = "👍👍🏻👍🏼👍🏾"
     XCTAssertTrue(s8.truncate(at: 1) == "👍…")
     XCTAssertTrue(s8.truncate(at: 2) == "👍👍🏻…")
     XCTAssertTrue(s8.truncate(at: 3) == "👍👍🏻👍🏼…")
     XCTAssertTrue(s8.truncate(at: 4) == "👍👍🏻👍🏼👍🏾")
     XCTAssertTrue(s8.truncate(at: 5) == "👍👍🏻👍🏼👍🏾")
-
+    
     //flags sperated by a ZERO WIDTH SPACE
     let s9 = "🇮🇹\u{200B}🇮🇹\u{200B}🇮🇹"
     XCTAssertTrue(s9.truncate(at: 1) == "🇮🇹…")

    XCTAssertTrue(string[1..<6] == "Test😗")
    XCTAssertNotNil(string["Test"])
    XCTAssertNotNil(string["😗"])

    // MARK: - Range

    XCTAssertTrue(string[Range(0..<3)] == "∆Te")
    XCTAssertTrue(string[Range(3..<3)] == "")
    XCTAssertTrue(string[Range(3..<6)] == "st😗")
    XCTAssertTrue(string[Range(0..<string.length)] == "∆Test😗🇮🇹")
    XCTAssertNil(string[Range(string.length ..< string.length+1)])
    XCTAssertTrue(string[Range(string.length ..< string.length)] == "")

    XCTAssertNil(string[Range(1 ..< 100)])
    XCTAssertNil(string[Range(-1 ..< 1)])
    XCTAssertNil(string[Range(1 ..< string.length+1)])

    XCTAssertTrue("AaBbCc".replace("", with: "A") == "AaBbCc")
    XCTAssertTrue("AaBbCc".replace("AaBbCc", with: "123") == "123")
    XCTAssertTrue("aaBbCa".replace("a", with: "1") == "11BbC1")
    
    XCTAssertTrue("AaBbCc🤔".replace("🤔", with: "🤔🤔") == "AaBbCc🤔🤔")
    XCTAssertTrue("".replace("🤔", with: "🤔🤔") == "")
    XCTAssertTrue("".replace("", with: "🤔") == "")
    
    XCTAssertTrue("Italy 🇮🇹\u{200B}🇮🇹\u{200B}🇮🇹".replace("\u{200B}", with: " ") == "Italy 🇮🇹 🇮🇹 🇮🇹")
    
    XCTAssertTrue("AaBbCc".replace("a", with: "Z", caseSensitive: false) == "ZZBbCc")
    XCTAssertTrue("AaBbCc".replace("a", with: "a", caseSensitive: false) == "aaBbCc")
    XCTAssertTrue("AaBbCc".replace("a", with: "A", caseSensitive: false) == "AABbCc")
    XCTAssertTrue("AaBbCc".replace("", with: "A", caseSensitive: false) == "AaBbCc")
  }
  
  func testTrim() {
    var s1 = "   Hello World   "
    s1.trim()
    XCTAssertTrue(s1 == "Hello World")
  }
  
  func testTrimmed() {
    let s1 = "   Hello World   "
    XCTAssertTrue(s1.trimmedLeft() == "Hello World   ")
    XCTAssertTrue(s1.trimmedRight() == "   Hello World")
    XCTAssertTrue(s1.trimmed() == "Hello World")
    
    let s2 = "   \u{200B} Hello World   "
    XCTAssertTrue(s2.trimmedLeft() == "Hello World   ")
    XCTAssertTrue(s2.trimmed() == "Hello World")
    
    let s3 = "Hello World\n\n   "
    XCTAssertTrue(s3.trimmedRight() == "Hello World")
    XCTAssertTrue(s3.trimmed() == "Hello World")
    
    
    let s4 = "abcdefg"
    XCTAssertTrue(s4.trimmedRight(characterSet: .alphanumerics) == "")
    XCTAssertTrue(s4.trimmedLeft(characterSet: .alphanumerics) == "")
    
    let s5 = "  abcdefg  "
    XCTAssertTrue(s5.trimmedRight(characterSet: .alphanumerics) == "  abcdefg  ")
    XCTAssertTrue(s5.trimmedLeft(characterSet: .alphanumerics) == "  abcdefg  ")
    XCTAssertTrue(s5.trimmed() == "abcdefg")
  }
  
  func testCapitalizedFirstCharacter() {
    let s1 = "   hello world   "
    XCTAssertTrue(s1.capitalizedFirstCharacter() == s1)
