Move string coder protocols into the same file
This commit is contained in:
parent
5d064644e9
commit
d0aa08edf2
|
@ -13,3 +13,27 @@ import Foundation
|
|||
and decode strings.
|
||||
*/
|
||||
public protocol StringCoder: StringEncoder, StringDecoder {}
|
||||
|
||||
/**
|
||||
This protocol can be implemented by classes that can decode
|
||||
strings.
|
||||
*/
|
||||
public protocol StringDecoder: AnyObject {
|
||||
|
||||
/**
|
||||
Decode a string to another string.
|
||||
*/
|
||||
func decode(_ string: String) -> String?
|
||||
}
|
||||
|
||||
/**
|
||||
This protocol can be implemented by classes that can encode
|
||||
strings.
|
||||
*/
|
||||
public protocol StringEncoder: AnyObject {
|
||||
|
||||
/**
|
||||
Encode a string to something else.
|
||||
*/
|
||||
func encode(_ string: String) -> String?
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
//
|
||||
// StringDecoder.swift
|
||||
// SwiftKit
|
||||
//
|
||||
// Created by Daniel Saidi on 2015-03-21.
|
||||
// Copyright © 2020 Daniel Saidi. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/**
|
||||
This protocol can be implemented by classes that can decode
|
||||
strings.
|
||||
*/
|
||||
public protocol StringDecoder: AnyObject {
|
||||
|
||||
/**
|
||||
Decode a string to another string.
|
||||
*/
|
||||
func decode(_ string: String) -> String?
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
//
|
||||
// StringEncoder.swift
|
||||
// SwiftKit
|
||||
//
|
||||
// Created by Daniel Saidi on 2015-03-21.
|
||||
// Copyright © 2020 Daniel Saidi. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/**
|
||||
This protocol can be implemented by classes that can encode
|
||||
strings.
|
||||
*/
|
||||
public protocol StringEncoder: AnyObject {
|
||||
|
||||
/**
|
||||
Encode a string to something else.
|
||||
*/
|
||||
func encode(_ string: String) -> String?
|
||||
}
|
Loading…
Reference in New Issue