 /// a `/` character, and holds a normalized string representation.  As with
 /// AbsolutePath, the normalization is strictly syntactic, and does not access
 /// the file system in any way.
+///
+/// The relative path string is normalized by:
+/// - Collapsing `..` path components that aren't at the beginning
+/// - Removing extraneous `.` path components
+/// - Removing any trailing path separator
+/// - Removing any redundant path separators
+/// - Replacing a completely empty path with a `.`
+///
+/// This string manipulation may change the meaning of a path if any of the
+/// path components are symbolic links on disk.  However, the file system is
+/// never accessed in any way when initializing a RelativePath.
 public struct RelativePath {
     /// Private implementation details, shared with the AbsolutePath struct.
     private let _impl: PathImpl

    /// Initializes the RelativePath from `str`, which must be a relative path
    /// (which means that it must not begin with a path separator or a tilde).
    /// An empty input path is allowed, but will be normalized to a single `.`
    /// character.
    ///
    /// The path string will be normalized by:
    /// - Collapsing `..` path components that aren't at the beginning
    /// - Removing extraneous `.` path components
    /// - Removing any trailing path separator
    /// - Removing any redundant path separators
    /// - Replacing a completely empty path with a `.`
    ///
    /// This string manipulation may change the meaning of a path if any of the
    /// path components are symbolic links on disk.  However, the file system is
    /// never accessed in any way when initializing an AbsolutePath.
    public init(_ string: String) {
        // Normalize the relative string and store it as our PathImpl.
        _impl = PathImpl(string: normalize(relative: string))

}


/// Private function that normalizes and returns a relative string.  Asserts
/// that `string` does not start with a path separator.
///
/// The normalization rules are as described for the AbsolutePath struct.
private func normalize(relative string: String) -> String {
    // FIXME: We should also guard against a leading `~`.
    precondition(string.characters.first != pathSeparatorCharacter)
    
    // Get a hold of the character view.
    // FIXME: Switch to use the UTF-8 view, which is more efficient.
    let chars = string.characters
