Last active
January 20, 2016 16:51
-
-
Save Francescu/6ddaa22c9b699f3b170f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String(contentsOfFile: "/test.txt") | |
/* OUTPUTS: | |
main.swift:2:17: note: overloads for 'String' exist with these partially matching parameter lists: (_StringCore), (Character), (String.CharacterView), (_builtinUnicodeScalarLiteral: Int32), (unicodeScalarLiteral: String), (extendedGraphemeClusterLiteral: String), (stringLiteral: String), (_storage: _StringBuffer), (S), (stringInterpolation: String...), (stringInterpolationSegment: T), (stringInterpolationSegment: String), (stringInterpolationSegment: Character), (stringInterpolationSegment: UnicodeScalar), (stringInterpolationSegment: Bool), (stringInterpolationSegment: Float32), (stringInterpolationSegment: Float64), (stringInterpolationSegment: UInt8), (stringInterpolationSegment: Int8), (stringInterpolationSegment: UInt16), (stringInterpolationSegment: Int16), (stringInterpolationSegment: UInt32), (stringInterpolationSegment: Int32), (stringInterpolationSegment: UInt64), (stringInterpolationSegment: Int64), (stringInterpolationSegment: UInt), (stringInterpolationSegment: Int), (UnicodeScalar), (T), (String.UnicodeScalarView), (String.UTF16View), (String.UTF8View), (reflecting: T) | |
*/ | |
String(contentsOfFile: "/test.txt", usedEncoding: nil) | |
/* OUTPUTS: | |
main.swift:4:12: note: overloads for 'String' exist with these partially matching parameter lists: (_builtinUTF16StringLiteral: RawPointer, numberOfCodeUnits: Word), (count: Int, repeatedValue: Character), (count: Int, repeatedValue: UnicodeScalar), (T, radix: Int, uppercase: Bool) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1> import Foundation | |
2> let test = String(contentsOfFile: "/test.txt") | |
fatal error: init(contentsOfFile:usedEncoding:) is not yet implemented: file Foundation/NSString.swift, line 1304 | |
test: String = { | |
_core = { | |
_baseAddress = <extracting data from value failed> | |
_countAndFlags = <extracting data from value failed> | |
_owner = <extracting data from value failed> | |
} | |
} | |
Execution interrupted. Enter code to recover and continue. | |
Enter LLDB commands to investigate (type :help for assistance.) | |
3> let test = String(contentsOfFile: "/test.txt", encoding: 4) | |
test: String = "Test\n" | |
4> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment