Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
7
Task/CRC-32/Swift/crc-32.swift
Normal file
7
Task/CRC-32/Swift/crc-32.swift
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import Foundation
|
||||
|
||||
let strData = "The quick brown fox jumps over the lazy dog".dataUsingEncoding(NSUTF8StringEncoding,
|
||||
allowLossyConversion: false)
|
||||
let crc = crc32(uLong(0), UnsafePointer<Bytef>(strData!.bytes), uInt(strData!.length))
|
||||
|
||||
println(NSString(format:"%2X", crc))
|
||||
Loading…
Add table
Add a link
Reference in a new issue