Initial commit; substitutions can be reviewed, no further functionality implemented yet

This commit is contained in:
Deniz Duezgoeren
2019-07-09 19:39:06 +02:00
commit 860d87f446
169 changed files with 30855 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
//
// DataUtil.swift
// SwifSoup
//
// Created by Nabil Chatbi on 02/10/16.
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
//
import Foundation
/**
* Internal static utilities for handling data.
*
*/
class DataUtil {
static let charsetPattern = "(?i)\\bcharset=\\s*(?:\"|')?([^\\s,;\"']*)"
static let defaultCharset = "UTF-8" // used if not found in header or meta charset
static let bufferSize = 0x20000 // ~130K.
static let UNICODE_BOM = 0xFEFF
static let mimeBoundaryChars = "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
static let boundaryLength = 32
}