├── .codecov.yml ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature-request.md └── workflows │ └── main.yml ├── .gitignore ├── .jazzy.yaml ├── .swiftlint.yml ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── .travis.yml ├── AGRegex.playground ├── Pages │ ├── FindIter.xcplaygroundpage │ │ └── Contents.swift │ ├── FirstLast.xcplaygroundpage │ │ └── Contents.swift │ ├── Sub.xcplaygroundpage │ │ └── Contents.swift │ └── findAll.xcplaygroundpage │ │ └── Contents.swift └── contents.xcplayground ├── AGString.playground ├── Contents.swift ├── Pages │ ├── CharAt.xcplaygroundpage │ │ └── Contents.swift │ ├── Slicing.xcplaygroundpage │ │ └── Contents.swift │ ├── Trim.xcplaygroundpage │ │ └── Contents.swift │ ├── WordCount.xcplaygroundpage │ │ └── Contents.swift │ └── Zfill.xcplaygroundpage │ │ └── Contents.swift └── contents.xcplayground ├── AGString.podspec ├── AGString.xcodeproj ├── project.pbxproj └── xcshareddata │ ├── xcbaselines │ └── 3D9C42F02274604A000A6585.xcbaseline │ │ ├── 3385FEE0-D0B1-4658-A4FC-4F5EA707274C.plist │ │ └── Info.plist │ └── xcschemes │ ├── AGString-iOS.xcscheme │ ├── AGString-macOS.xcscheme │ ├── AGString-tvOS.xcscheme │ └── AGString-watchOS.xcscheme ├── Configs ├── AGString.plist └── AGStringTests.plist ├── Example ├── AppDelegate.swift └── Resources │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── Contents.json │ ├── Base.lproj │ └── LaunchScreen.storyboard │ └── Info.plist ├── LICENSE ├── Package.swift ├── README.md ├── Resources └── AppIcon │ ├── android │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ ├── mipmap-ldpi │ │ └── ic_launcher.png │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ └── playstore-icon.png │ ├── imessenger │ ├── icon-messages-app-27x20@1x.png │ ├── icon-messages-app-27x20@2x.png │ ├── icon-messages-app-27x20@3x.png │ ├── icon-messages-app-iPadAir-67x50@2x.png │ ├── icon-messages-app-iPadAir-74x55@2x.png │ ├── icon-messages-app-iPhone-60x45@1x.png │ ├── icon-messages-app-iPhone-60x45@2x.png │ ├── icon-messages-app-iPhone-60x45@3x.png │ ├── icon-messages-app-store-1024x768.png │ ├── icon-messages-transcript-32x24@1x.png │ ├── icon-messages-transcript-32x24@2x.png │ └── icon-messages-transcript-32x24@3x.png │ ├── ios │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ ├── Icon-App-83.5x83.5@2x.png │ │ └── ItunesArtwork@2x.png │ ├── README.md │ ├── iTunesArtwork@1x.png │ ├── iTunesArtwork@2x.png │ └── iTunesArtwork@3x.png │ └── watchkit │ └── AppIcon.appiconset │ ├── Contents.json │ ├── Icon-24@2x.png │ ├── Icon-27.5@2x.png │ ├── Icon-29@2x.png │ ├── Icon-29@3x.png │ ├── Icon-40@2x.png │ ├── Icon-44@2x.png │ ├── Icon-86@2x.png │ └── Icon-98@2x.png ├── Sources ├── Regex │ ├── AGMatch.swift │ ├── AGMatchLazyList.swift │ ├── AGMatchLazyListIterator.swift │ ├── AGMatchList.swift │ ├── AGMatchListIterator.swift │ ├── AGRegex.swift │ └── String+NSRange.swift └── String │ ├── AGString.swift │ ├── StringIndex.swift │ └── Utility.swift ├── Tests ├── AGRegexTest.swift ├── AGStringTests.swift └── LinuxMain.swift ├── deploy_rsa.enc ├── fastlane ├── .env └── Fastfile └── sonar-project.properties /.codecov.yml: -------------------------------------------------------------------------------- 1 | # For more configuration details: 2 | # https://docs.codecov.io/docs/codecov-yaml 3 | 4 | # Check if this file is valid by running in bash: 5 | # curl -X POST --data-binary @.codecov.yml https://codecov.io/validate 6 | 7 | # Coverage configuration 8 | # ---------------------- 9 | coverage: 10 | 11 | notify: 12 | slack: 13 | default: 14 | url: "https://hooks.slack.com/services/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" 15 | threshold: 1% 16 | only_pulls: false 17 | branches: null 18 | flags: null 19 | paths: null 20 | 21 | status: 22 | patch: false 23 | 24 | range: 70..90 # First number represents red, and second represents green 25 | # (default is 70..100) 26 | round: down # up, down, or nearest 27 | precision: 2 # Number of decimal places, between 0 and 5 28 | 29 | # Ignoring Paths 30 | # -------------- 31 | # which folders/files to ignore 32 | 33 | # Pull request comments: 34 | # ---------------------- 35 | # Diff is the Coverage Diff of the pull request. 36 | # Files are the files impacted by the pull request 37 | comment: 38 | layout: diff, files # accepted in any order: reach, diff, flags, and/or files 39 | 40 | 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a bug report 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## AGString Environment 11 | 12 | - AGString version: 13 | - macOS version: 14 | - Xcode version: 15 | - Dependency manager (Carthage, CocoaPods, SPM, Manually): 16 | 17 | ## What did you do? 18 | 19 | > ℹ Please replace this with what you did. 20 | 21 | ## What did you expect to happen? 22 | 23 | > ℹ Please replace this with what you expected to happen. 24 | 25 | ## What happened instead? 26 | 27 | > ℹ Please replace this with of what happened instead. 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for AGString 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | # Motivation 11 | > ℹ Please replace this with your motivation. For example if your feature request is related to a problem. 12 | 13 | # Solution 14 | > ℹ Please replace this with your proposed solution. 15 | 16 | # Additional context 17 | > ℹ Please replace this with any other context or screenshots about your feature request (optional). 18 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - develop 8 | - /^hotfix.*$/ 9 | - /^feature.*$/ 10 | 11 | jobs: 12 | tests: 13 | name: Unit-Tests 14 | runs-on: macOS-latest 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: fastlane ios tests 18 | run: fastlane ios tests 19 | compatibility: 20 | name: Compatibility-Tests 21 | runs-on: macOS-latest 22 | steps: 23 | - uses: actions/checkout@v1 24 | - name: fastlane ios compatibilityTests 25 | run: fastlane ios compatibilityTests -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos,xcode,carthage,cocoapods,fastlane 3 | 4 | ### Carthage ### 5 | # Carthage 6 | # 7 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 8 | Carthage/Checkouts 9 | 10 | Carthage/Build 11 | 12 | ### CocoaPods ### 13 | ## CocoaPods GitIgnore Template 14 | 15 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 16 | # - Also handy if you have a large number of dependant pods 17 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 18 | Pods/ 19 | 20 | ### macOS ### 21 | *.DS_Store 22 | .AppleDouble 23 | .LSOverride 24 | 25 | # Icon must end with two \r 26 | Icon 27 | 28 | # Thumbnails 29 | ._* 30 | 31 | # Documentation 32 | Documentation 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | .com.apple.timemachine.donotpresent 42 | 43 | # Directories potentially created on remote AFP share 44 | .AppleDB 45 | .AppleDesktop 46 | Network Trash Folder 47 | Temporary Items 48 | .apdisk 49 | 50 | ### Xcode ### 51 | # Xcode 52 | # 53 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 54 | 55 | ## Build generated 56 | build/ 57 | DerivedData/ 58 | 59 | ## Various settings 60 | *.pbxuser 61 | !default.pbxuser 62 | *.mode1v3 63 | !default.mode1v3 64 | *.mode2v3 65 | !default.mode2v3 66 | *.perspectivev3 67 | !default.perspectivev3 68 | xcuserdata/ 69 | 70 | ## Other 71 | *.moved-aside 72 | *.xccheckout 73 | *.xcscmblueprint 74 | 75 | ### Xcode Patch ### 76 | *.xcodeproj/* 77 | !*.xcodeproj/project.pbxproj 78 | !*.xcodeproj/xcshareddata/ 79 | !*.xcworkspace/contents.xcworkspacedata 80 | /*.gcno 81 | 82 | ### fastlane ### 83 | # fastlane - A streamlined workflow tool for Cocoa deployment 84 | # 85 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 86 | # screenshots whenever they are needed. 87 | # For more information about the recommended setup visit: 88 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 89 | 90 | # fastlane specific 91 | /fastlane/README.md 92 | fastlane/report.xml 93 | 94 | # deliver temporary files 95 | fastlane/Preview.html 96 | 97 | # snapshot generated screenshots 98 | fastlane/screenshots/**/*.png 99 | fastlane/screenshots/screenshots.html 100 | 101 | # scan temporary files 102 | fastlane/test_output 103 | 104 | # End of https://www.gitignore.io/api/macos,xcode,carthage,cocoapods,fastlane -------------------------------------------------------------------------------- /.jazzy.yaml: -------------------------------------------------------------------------------- 1 | # AGString document generator jazzy settings 2 | 3 | copyright: Copyright 2019 AGString 4 | author: AGString 5 | xcodebuild_arguments: [-target, AGString-iOS] 6 | clean: true 7 | output: ./Documentation 8 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | opt_in_rules: # some rules are only opt-in 2 | - empty_count 3 | - redundant_nil_coalescing 4 | - switch_case_on_newline 5 | - force_unwrapping 6 | - conditional_returns_on_newline 7 | - closure_spacing 8 | - implicitly_unwrapped_optional 9 | - sorted_imports 10 | - valid_docs 11 | - nslocalizedstring_require_bundle 12 | 13 | included: 14 | - Sources 15 | 16 | excluded: # paths to ignore during linting. Takes precedence over `included`. 17 | - Tests 18 | - Example 19 | 20 | disabled_rules: # rule identifiers to exclude from running 21 | - trailing_whitespace -------------------------------------------------------------------------------- /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | branches: 3 | only: 4 | - master 5 | - develop 6 | - "/^hotfix.*$/" 7 | - "/^feature.*$/" 8 | language: swift 9 | osx_image: xcode11.2 10 | sudo: false 11 | xcode_project: AGString.xcodeproj 12 | xcode_scheme: AGString 13 | dist: trusty 14 | 15 | 16 | addons: 17 | ssh_known_hosts: github.com 18 | sonarcloud: 19 | organization: swiftalgorithmclub 20 | token: 21 | secure: "$SONAR_TOKEN" 22 | 23 | env: 24 | - CACHE_NAME=iOS PLATFORM=iOS 25 | - CACHE_NAME=macOS PLATFORM=macOS 26 | - CACHE_NAME=tvOS PLATFORM=tvOS 27 | - CACHE_NAME=watchOS PLATFORM=watchOS 28 | 29 | 30 | 31 | before_install: 32 | - openssl aes-256-cbc -K $encrypted_2f16b48e5f2e_key -iv $encrypted_2f16b48e5f2e_iv -in deploy_rsa.enc -out deploy_rsa -d 33 | - mv deploy_rsa ~/.ssh/id_rsa 34 | - chmod 600 ~/.ssh/id_rsa 35 | - eval $(ssh-agent -s) 36 | - ssh-add ~/.ssh/id_rsa 37 | 38 | 39 | install: 40 | - gem install cocoapods -v '~> 1.7.0' 41 | - pip install codecov 42 | 43 | before_script: 44 | - export RUN_TESTS="YES" 45 | - export SCHEME="${TRAVIS_XCODE_SCHEME}-${PLATFORM}" 46 | - echo "TRAVIS_XCODE_SCHEME ${TRAVIS_XCODE_SCHEME} PLATFORM ${PLATFORM}" 47 | 48 | - case "${PLATFORM}" in 49 | "iOS") 50 | export SDK="iphonesimulator13.2"; 51 | export DESTINATION="platform=iOS Simulator,OS=13.2,name=iPhone 8"; 52 | ;; 53 | "macOS") 54 | export SDK="macosx10.15"; 55 | export DESTINATION="platform=macOS,arch=x86_64"; 56 | ;; 57 | "tvOS") 58 | export SDK="appletvsimulator13.2"; 59 | export DESTINATION="platform=tvOS Simulator,OS=13.2,name=Apple TV"; 60 | ;; 61 | "watchOS") 62 | export SDK="watchsimulator6.1"; 63 | export DESTINATION="platform=watchOS Simulator,OS=6.1,name=Apple Watch Series 5 - 44mm"; 64 | export RUN_TESTS="NO"; 65 | ;; 66 | esac 67 | 68 | script: 69 | - set -o pipefail 70 | - xcodebuild -version 71 | - xcodebuild -showsdks 72 | 73 | 74 | - xcodebuild clean -project "${TRAVIS_XCODE_PROJECT}" -scheme "${SCHEME}" | xcpretty 75 | 76 | # Build Framework in Debug and Run Tests if specified 77 | 78 | 79 | - echo "BUILD FOR DEBUG" 80 | - if [ ${RUN_TESTS} == "YES" ]; then 81 | xcodebuild -project "${TRAVIS_XCODE_PROJECT}" -derivedDataPath Build/ -scheme "${SCHEME}" -sdk "${SDK}" -destination "${DESTINATION}" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; 82 | else 83 | xcodebuild -project "${TRAVIS_XCODE_PROJECT}" -scheme "${SCHEME}" -sdk "${SDK}" -destination "${DESTINATION}" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; 84 | fi 85 | 86 | - xcodebuild clean -project "$TRAVIS_XCODE_PROJECT" -scheme "$SCHEME" | xcpretty 87 | - sonar-scanner 88 | 89 | 90 | - git remote set-url origin git@github.com:SwiftAlgorithmClub/AGString.git 91 | 92 | # 개선이 필요합니다. 93 | # https://github.com/mxcl/PromiseKit/blob/master/.travis.yml 94 | # iOS, macOs, watch, tv 가 모두 성공했을 경우 실행이 필요합니다. 95 | - if [ $TRAVIS_EVENT_TYPE == "cron" ] && [ $TRAVIS_BRANCH == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$PLATFORM" == "iOS" ]; then 96 | - echo "Increase a patch version" 97 | - export TAG_VERSION=$(git describe --abbrev=0 --tags) 98 | - export NEW_TAG_VERSION=$(echo ${TAG_VERSION} | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}') 99 | 100 | - sed -e "s/\${version}/${NEW_TAG_VERSION}/" TemplatePodspec > AGString.podspec 101 | - git tag -m "[Cron] Update podspec" $NEW_TAG_VERSION; 102 | - git push --tags; 103 | - pod lib lint --allow-warnings; 104 | - pod trunk me --verbose; 105 | - pod trunk push AGString.podspec; 106 | - pod trunk me clean-sessions --all # Clear All Sessions 107 | fi 108 | 109 | after_success: 110 | - codecov 111 | 112 | 113 | notifications: 114 | slack: 115 | rooms: 116 | - swiftalgorithmclub:rJxmAKJgpZNBKR2ogwcHbtGu#agstring 117 | -------------------------------------------------------------------------------- /AGRegex.playground/Pages/FindIter.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | let r = try! NSRegularExpression(pattern: "([A-Z]+)([0-9]+)", options: []) 6 | let regex = AGRegex(r) 7 | let str = "ABC12DEF3G56HIJ7" 8 | 9 | 10 | var text = "" 11 | for (i, m) in regex.finditer(str).enumerated() { 12 | print("\(m.group(2)) * \(m.group(1))") 13 | } 14 | 15 | /*: 16 | ### Expects 17 | 18 | 1. "12 * ABC", 19 | 2. "3 * DEF", 20 | 3. "56 * G", 21 | 4. "7 * HIJ" 22 | */ 23 | -------------------------------------------------------------------------------- /AGRegex.playground/Pages/FirstLast.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | let r = try! NSRegularExpression(pattern: "ai", options: []) 6 | let regex = AGRegex(r) 7 | let str = "The rain in Spain" 8 | let first = regex.first(str) 9 | 10 | first 11 | 12 | /*: 13 | ### Expects 14 | 15 | * AGMatch(start: 5, end: 7, base: str, groups: ["ai"]) 16 | 17 | */ 18 | 19 | 20 | let last = regex.last(str) 21 | 22 | last 23 | 24 | /*: 25 | ### Expects 26 | 27 | * AGMatch(start: 14, end: 16, base: str, groups: ["ai"]) 28 | 29 | */ 30 | 31 | 32 | //: [Next](Sub) 33 | -------------------------------------------------------------------------------- /AGRegex.playground/Pages/Sub.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | let r = try! NSRegularExpression(pattern: "\\s", options: []) 6 | let regex = AGRegex(r) 7 | let str = "The rain in Spain" 8 | let sub = regex.sub(str: str, replace: "9") 9 | 10 | sub == "The9rain9in9Spain" 11 | 12 | let subWithCount = regex.sub(str: str, replace: "9", count: 2) 13 | 14 | 15 | subWithCount == "The9rain9in Spain" 16 | 17 | 18 | //: [Next](FindIter) 19 | -------------------------------------------------------------------------------- /AGRegex.playground/Pages/findAll.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | let r = try! NSRegularExpression(pattern: "ai", options: []) 6 | let regex = AGRegex(r) 7 | let str = "The rain in Spain" 8 | let actual = regex.findAll(str) 9 | 10 | actual 11 | 12 | /*: 13 | ### Expects 14 | 15 | * AGMatch(start: 5, end: 7, base: str, groups: ["ai"]), 16 | * AGMatch(start: 14, end: 16, base: str, groups: ["ai"]), 17 | */ 18 | 19 | //: [Next](FirstLast) 20 | -------------------------------------------------------------------------------- /AGRegex.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AGString.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | import AGString 2 | 3 | var str = "Hello, playground" 4 | -------------------------------------------------------------------------------- /AGString.playground/Pages/CharAt.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | var str = "Hello, World!" 6 | 7 | str[1] == "e" 8 | 9 | 10 | //: [Next](Zfill) 11 | -------------------------------------------------------------------------------- /AGString.playground/Pages/Slicing.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | import AGString 5 | 6 | var str = "Hello, World!" 7 | 8 | str[1..<3] == "el" 9 | str[7...9] == "Wor" 10 | str[7...] == "World!" 11 | str[..<5] == "Hello" 12 | str[...5] == "Hello," 13 | 14 | //: [Next](CharAt) 15 | -------------------------------------------------------------------------------- /AGString.playground/Pages/Trim.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | 6 | " abcd ".trimLeft() == "abcd " 7 | " abcd ".trimRight() == " abcd" 8 | " abcd ".trim() == "abcd" 9 | 10 | //: [Next](Regex) 11 | -------------------------------------------------------------------------------- /AGString.playground/Pages/WordCount.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | 6 | let str = "like in like" 7 | 8 | str.occurence(of: "like") == 2 9 | 10 | //: [Next](Trim) 11 | -------------------------------------------------------------------------------- /AGString.playground/Pages/Zfill.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | //: [Previous](@previous) 2 | 3 | import AGString 4 | 5 | 6 | let str = "abc" 7 | 8 | let str2 = str.zfill(10) 9 | 10 | str2 == "0000000abc" 11 | 12 | let str3 = str.zfill(10, with: "1", direction: .right) 13 | 14 | str3 == "abc1111111" 15 | 16 | //: [Next](WordCount) 17 | -------------------------------------------------------------------------------- /AGString.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /AGString.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AGString" 3 | s.version = "2.0.0" 4 | s.summary = "AGString" 5 | s.homepage = "https://github.com/SwiftAlgorithmClub/AGString.git" 6 | s.license = { :type => "MIT", :file => "LICENSE" } 7 | s.author = { "AGString" => "kimtaesoo188@gmail.com" } 8 | s.source = { :git => "https://github.com/SwiftAlgorithmClub/AGString.git", :tag => s.version.to_s } 9 | s.swift_version = "5.1" 10 | s.ios.deployment_target = "8.0" 11 | s.tvos.deployment_target = "9.0" 12 | s.watchos.deployment_target = "2.0" 13 | s.osx.deployment_target = "10.10" 14 | s.source_files = "Sources/**/*" 15 | s.frameworks = "Foundation" 16 | end 17 | -------------------------------------------------------------------------------- /AGString.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2FBE39ED2377C7B700D65251 /* AGRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDB3A5A1236EF1B30041D167 /* AGRegex.swift */; }; 11 | 2FBE39EE2377C7B700D65251 /* AGMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777323701C86007DCFB6 /* AGMatch.swift */; }; 12 | 2FBE39EF2377C7B700D65251 /* AGMatchListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDA016123703F820001AF7C /* AGMatchListIterator.swift */; }; 13 | 2FBE39F02377C7B700D65251 /* String+NSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6C86D12372D77B004C83A0 /* String+NSRange.swift */; }; 14 | 2FBE39F12377C7B700D65251 /* StringIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5EFC82236EF301005134D1 /* StringIndex.swift */; }; 15 | 2FBE39F22377C7B700D65251 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4F190B236F126000A0CD30 /* Utility.swift */; }; 16 | 2FBE39F32377C7C000D65251 /* AGRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDB3A5A1236EF1B30041D167 /* AGRegex.swift */; }; 17 | 2FBE39F42377C7C000D65251 /* AGMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777323701C86007DCFB6 /* AGMatch.swift */; }; 18 | 2FBE39F52377C7C000D65251 /* AGMatchListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDA016123703F820001AF7C /* AGMatchListIterator.swift */; }; 19 | 2FBE39F62377C7C000D65251 /* String+NSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6C86D12372D77B004C83A0 /* String+NSRange.swift */; }; 20 | 2FBE39F72377C7C000D65251 /* StringIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5EFC82236EF301005134D1 /* StringIndex.swift */; }; 21 | 2FBE39F82377C7C000D65251 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4F190B236F126000A0CD30 /* Utility.swift */; }; 22 | 2FBE39F92377C7C600D65251 /* AGRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDB3A5A1236EF1B30041D167 /* AGRegex.swift */; }; 23 | 2FBE39FA2377C7C600D65251 /* AGMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777323701C86007DCFB6 /* AGMatch.swift */; }; 24 | 2FBE39FB2377C7C600D65251 /* AGMatchListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDA016123703F820001AF7C /* AGMatchListIterator.swift */; }; 25 | 2FBE39FC2377C7C600D65251 /* String+NSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6C86D12372D77B004C83A0 /* String+NSRange.swift */; }; 26 | 2FBE39FD2377C7C600D65251 /* StringIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5EFC82236EF301005134D1 /* StringIndex.swift */; }; 27 | 2FBE39FE2377C7C600D65251 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4F190B236F126000A0CD30 /* Utility.swift */; }; 28 | 3D9C42A222745900000A6585 /* AGString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42A122745900000A6585 /* AGString.swift */; }; 29 | 3D9C42B1227459C1000A6585 /* AGString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42A122745900000A6585 /* AGString.swift */; }; 30 | 3D9C42BF227459F6000A6585 /* AGString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42A122745900000A6585 /* AGString.swift */; }; 31 | 3D9C42CD22745A28000A6585 /* AGString.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42A122745900000A6585 /* AGString.swift */; }; 32 | 3D9C42F62274604A000A6585 /* AGString.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D9C429022745894000A6585 /* AGString.framework */; }; 33 | 3D9C42FC22746078000A6585 /* AGStringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42D722745CDE000A6585 /* AGStringTests.swift */; }; 34 | 3D9C43062274611B000A6585 /* AGString.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D9C42A92274599D000A6585 /* AGString.framework */; }; 35 | 3D9C430C22746131000A6585 /* AGStringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42D722745CDE000A6585 /* AGStringTests.swift */; }; 36 | 3D9C431622746198000A6585 /* AGString.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D9C42C522745A07000A6585 /* AGString.framework */; }; 37 | 3D9C431C227461AF000A6585 /* AGStringTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C42D722745CDE000A6585 /* AGStringTests.swift */; }; 38 | 3D9C43242274629B000A6585 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D9C43232274629B000A6585 /* AppDelegate.swift */; }; 39 | 3D9C432B2274629C000A6585 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3D9C432A2274629C000A6585 /* Assets.xcassets */; }; 40 | 3D9C432E2274629C000A6585 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3D9C432C2274629C000A6585 /* LaunchScreen.storyboard */; }; 41 | 3D9C433422746323000A6585 /* AGString.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D9C429022745894000A6585 /* AGString.framework */; }; 42 | 3D9C433522746323000A6585 /* AGString.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3D9C429022745894000A6585 /* AGString.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 43 | BD02777423701C86007DCFB6 /* AGMatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777323701C86007DCFB6 /* AGMatch.swift */; }; 44 | BD02777723701DAE007DCFB6 /* AGRegexTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777523701DA2007DCFB6 /* AGRegexTest.swift */; }; 45 | BD02777823701DB4007DCFB6 /* AGRegexTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777523701DA2007DCFB6 /* AGRegexTest.swift */; }; 46 | BD02777923701DB7007DCFB6 /* AGRegexTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD02777523701DA2007DCFB6 /* AGRegexTest.swift */; }; 47 | BDB3A5A2236EF1B30041D167 /* AGRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDB3A5A1236EF1B30041D167 /* AGRegex.swift */; }; 48 | BDDA016223703F820001AF7C /* AGMatchListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDDA016123703F820001AF7C /* AGMatchListIterator.swift */; }; 49 | FF2593DA237827DE003C3B1F /* AGMatchList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2593D9237827DE003C3B1F /* AGMatchList.swift */; }; 50 | FF2593DB237827E5003C3B1F /* AGMatchList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2593D9237827DE003C3B1F /* AGMatchList.swift */; }; 51 | FF2593DC237827E5003C3B1F /* AGMatchList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2593D9237827DE003C3B1F /* AGMatchList.swift */; }; 52 | FF2593DD237827E5003C3B1F /* AGMatchList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2593D9237827DE003C3B1F /* AGMatchList.swift */; }; 53 | FF4F190C236F126000A0CD30 /* Utility.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF4F190B236F126000A0CD30 /* Utility.swift */; }; 54 | FF5EFC83236EF301005134D1 /* StringIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5EFC82236EF301005134D1 /* StringIndex.swift */; }; 55 | FF6C86D22372D77B004C83A0 /* String+NSRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6C86D12372D77B004C83A0 /* String+NSRange.swift */; }; 56 | FFEFD6A023796E4200B17B4A /* AGMatchLazyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */; }; 57 | FFEFD6A223796EDE00B17B4A /* AGMatchLazyListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */; }; 58 | FFEFD6A5237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */; }; 59 | FFEFD6A6237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */; }; 60 | FFEFD6A7237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */; }; 61 | FFEFD6A8237984E000B17B4A /* AGMatchLazyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */; }; 62 | FFEFD6A9237984E000B17B4A /* AGMatchLazyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */; }; 63 | FFEFD6AA237984E100B17B4A /* AGMatchLazyList.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */; }; 64 | /* End PBXBuildFile section */ 65 | 66 | /* Begin PBXContainerItemProxy section */ 67 | 3D9C42F72274604A000A6585 /* PBXContainerItemProxy */ = { 68 | isa = PBXContainerItemProxy; 69 | containerPortal = 3D9C428722745894000A6585 /* Project object */; 70 | proxyType = 1; 71 | remoteGlobalIDString = 3D9C428F22745894000A6585; 72 | remoteInfo = "AGString-iOS"; 73 | }; 74 | 3D9C43072274611B000A6585 /* PBXContainerItemProxy */ = { 75 | isa = PBXContainerItemProxy; 76 | containerPortal = 3D9C428722745894000A6585 /* Project object */; 77 | proxyType = 1; 78 | remoteGlobalIDString = 3D9C42A82274599D000A6585; 79 | remoteInfo = "AGString-tvOS"; 80 | }; 81 | 3D9C431722746198000A6585 /* PBXContainerItemProxy */ = { 82 | isa = PBXContainerItemProxy; 83 | containerPortal = 3D9C428722745894000A6585 /* Project object */; 84 | proxyType = 1; 85 | remoteGlobalIDString = 3D9C42C422745A07000A6585; 86 | remoteInfo = "AGString-macOS"; 87 | }; 88 | 3D9C433622746323000A6585 /* PBXContainerItemProxy */ = { 89 | isa = PBXContainerItemProxy; 90 | containerPortal = 3D9C428722745894000A6585 /* Project object */; 91 | proxyType = 1; 92 | remoteGlobalIDString = 3D9C428F22745894000A6585; 93 | remoteInfo = "AGString-iOS"; 94 | }; 95 | /* End PBXContainerItemProxy section */ 96 | 97 | /* Begin PBXCopyFilesBuildPhase section */ 98 | 3D9C433822746323000A6585 /* Embed Frameworks */ = { 99 | isa = PBXCopyFilesBuildPhase; 100 | buildActionMask = 2147483647; 101 | dstPath = ""; 102 | dstSubfolderSpec = 10; 103 | files = ( 104 | 3D9C433522746323000A6585 /* AGString.framework in Embed Frameworks */, 105 | ); 106 | name = "Embed Frameworks"; 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXCopyFilesBuildPhase section */ 110 | 111 | /* Begin PBXFileReference section */ 112 | 2F6581C02377FA9200C5004C /* AGString.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = AGString.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 113 | 2FD35AE52377FD0E00D0B4F1 /* AGRegex.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = AGRegex.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 114 | 3D9C429022745894000A6585 /* AGString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AGString.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 115 | 3D9C429C227458E8000A6585 /* AGString.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AGString.plist; sourceTree = ""; }; 116 | 3D9C429D227458E8000A6585 /* AGStringTests.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AGStringTests.plist; sourceTree = ""; }; 117 | 3D9C42A122745900000A6585 /* AGString.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGString.swift; sourceTree = ""; }; 118 | 3D9C42A92274599D000A6585 /* AGString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AGString.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 119 | 3D9C42B7227459D6000A6585 /* AGString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AGString.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 120 | 3D9C42C522745A07000A6585 /* AGString.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AGString.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 121 | 3D9C42D222745B48000A6585 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = SOURCE_ROOT; }; 122 | 3D9C42D322745B48000A6585 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; }; 123 | 3D9C42D422745B48000A6585 /* AGString.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AGString.podspec; sourceTree = SOURCE_ROOT; }; 124 | 3D9C42D522745B48000A6585 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; 125 | 3D9C42D622745C9D000A6585 /* Fastfile */ = {isa = PBXFileReference; lastKnownFileType = text; name = Fastfile; path = fastlane/Fastfile; sourceTree = SOURCE_ROOT; }; 126 | 3D9C42D722745CDE000A6585 /* AGStringTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGStringTests.swift; sourceTree = ""; }; 127 | 3D9C42D822745DAF000A6585 /* .jazzy.yaml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .jazzy.yaml; sourceTree = SOURCE_ROOT; }; 128 | 3D9C42D922745DAF000A6585 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = SOURCE_ROOT; }; 129 | 3D9C42DB22745DB0000A6585 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = SOURCE_ROOT; }; 130 | 3D9C42EC22745FDA000A6585 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = ""; }; 131 | 3D9C42F12274604A000A6585 /* AGString-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AGString-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 132 | 3D9C43012274611B000A6585 /* AGString-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AGString-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 133 | 3D9C431122746198000A6585 /* AGString-macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AGString-macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 134 | 3D9C43212274629B000A6585 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 135 | 3D9C43232274629B000A6585 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 136 | 3D9C432A2274629C000A6585 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 137 | 3D9C432D2274629C000A6585 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 138 | 3D9C432F2274629C000A6585 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 139 | 3DB91AC4229AC263002668DA /* .travis.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .travis.yml; sourceTree = SOURCE_ROOT; }; 140 | 3DF6F6282315616D00706C4E /* main.yml */ = {isa = PBXFileReference; lastKnownFileType = text; name = main.yml; path = .github/workflows/main.yml; sourceTree = SOURCE_ROOT; }; 141 | BD02777323701C86007DCFB6 /* AGMatch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGMatch.swift; sourceTree = ""; }; 142 | BD02777523701DA2007DCFB6 /* AGRegexTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGRegexTest.swift; sourceTree = ""; }; 143 | BDB3A5A1236EF1B30041D167 /* AGRegex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGRegex.swift; sourceTree = ""; }; 144 | BDDA016123703F820001AF7C /* AGMatchListIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGMatchListIterator.swift; sourceTree = ""; }; 145 | FF2593D9237827DE003C3B1F /* AGMatchList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGMatchList.swift; sourceTree = ""; }; 146 | FF4F190B236F126000A0CD30 /* Utility.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utility.swift; sourceTree = ""; }; 147 | FF5EFC82236EF301005134D1 /* StringIndex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringIndex.swift; sourceTree = ""; }; 148 | FF6C86D12372D77B004C83A0 /* String+NSRange.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+NSRange.swift"; sourceTree = ""; }; 149 | FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGMatchLazyList.swift; sourceTree = ""; }; 150 | FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AGMatchLazyListIterator.swift; sourceTree = ""; }; 151 | /* End PBXFileReference section */ 152 | 153 | /* Begin PBXFrameworksBuildPhase section */ 154 | 3D9C428D22745894000A6585 /* Frameworks */ = { 155 | isa = PBXFrameworksBuildPhase; 156 | buildActionMask = 2147483647; 157 | files = ( 158 | ); 159 | runOnlyForDeploymentPostprocessing = 0; 160 | }; 161 | 3D9C42A62274599D000A6585 /* Frameworks */ = { 162 | isa = PBXFrameworksBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | 3D9C42B4227459D6000A6585 /* Frameworks */ = { 169 | isa = PBXFrameworksBuildPhase; 170 | buildActionMask = 2147483647; 171 | files = ( 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | 3D9C42C222745A07000A6585 /* Frameworks */ = { 176 | isa = PBXFrameworksBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | 3D9C42EE2274604A000A6585 /* Frameworks */ = { 183 | isa = PBXFrameworksBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 3D9C42F62274604A000A6585 /* AGString.framework in Frameworks */, 187 | ); 188 | runOnlyForDeploymentPostprocessing = 0; 189 | }; 190 | 3D9C42FE2274611B000A6585 /* Frameworks */ = { 191 | isa = PBXFrameworksBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 3D9C43062274611B000A6585 /* AGString.framework in Frameworks */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | 3D9C430E22746198000A6585 /* Frameworks */ = { 199 | isa = PBXFrameworksBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 3D9C431622746198000A6585 /* AGString.framework in Frameworks */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | 3D9C431E2274629B000A6585 /* Frameworks */ = { 207 | isa = PBXFrameworksBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 3D9C433422746323000A6585 /* AGString.framework in Frameworks */, 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXFrameworksBuildPhase section */ 215 | 216 | /* Begin PBXGroup section */ 217 | 3D9C428622745894000A6585 = { 218 | isa = PBXGroup; 219 | children = ( 220 | 2FD35AE52377FD0E00D0B4F1 /* AGRegex.playground */, 221 | 2F6581C02377FA9200C5004C /* AGString.playground */, 222 | 3D9C42A0227458FA000A6585 /* Sources */, 223 | 3D9C42A32274595F000A6585 /* Tests */, 224 | 3D9C43222274629B000A6585 /* Example */, 225 | 3D9C429B227458E8000A6585 /* Configs */, 226 | 3D9C429122745894000A6585 /* Products */, 227 | ); 228 | sourceTree = ""; 229 | }; 230 | 3D9C429122745894000A6585 /* Products */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 3D9C429022745894000A6585 /* AGString.framework */, 234 | 3D9C42A92274599D000A6585 /* AGString.framework */, 235 | 3D9C42B7227459D6000A6585 /* AGString.framework */, 236 | 3D9C42C522745A07000A6585 /* AGString.framework */, 237 | 3D9C42F12274604A000A6585 /* AGString-iOSTests.xctest */, 238 | 3D9C43012274611B000A6585 /* AGString-tvOSTests.xctest */, 239 | 3D9C431122746198000A6585 /* AGString-macOSTests.xctest */, 240 | 3D9C43212274629B000A6585 /* Example.app */, 241 | ); 242 | name = Products; 243 | sourceTree = ""; 244 | }; 245 | 3D9C429B227458E8000A6585 /* Configs */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 3D9C429C227458E8000A6585 /* AGString.plist */, 249 | 3D9C429D227458E8000A6585 /* AGStringTests.plist */, 250 | 3D9C42D422745B48000A6585 /* AGString.podspec */, 251 | 3D9C42D322745B48000A6585 /* Package.swift */, 252 | 3D9C42D622745C9D000A6585 /* Fastfile */, 253 | 3D9C42D222745B48000A6585 /* LICENSE */, 254 | 3D9C42D522745B48000A6585 /* README.md */, 255 | 3D9C42DB22745DB0000A6585 /* .gitignore */, 256 | 3D9C42D822745DAF000A6585 /* .jazzy.yaml */, 257 | 3D9C42D922745DAF000A6585 /* .swiftlint.yml */, 258 | 3DB91AC4229AC263002668DA /* .travis.yml */, 259 | 3DF6F6282315616D00706C4E /* main.yml */, 260 | ); 261 | path = Configs; 262 | sourceTree = ""; 263 | }; 264 | 3D9C42A0227458FA000A6585 /* Sources */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | BDB3A5A0236EF1A20041D167 /* Regex */, 268 | BDB3A59F236EF19B0041D167 /* String */, 269 | ); 270 | path = Sources; 271 | sourceTree = ""; 272 | }; 273 | 3D9C42A32274595F000A6585 /* Tests */ = { 274 | isa = PBXGroup; 275 | children = ( 276 | 3D9C42EC22745FDA000A6585 /* LinuxMain.swift */, 277 | 3D9C42D722745CDE000A6585 /* AGStringTests.swift */, 278 | BD02777523701DA2007DCFB6 /* AGRegexTest.swift */, 279 | ); 280 | path = Tests; 281 | sourceTree = ""; 282 | }; 283 | 3D9C43222274629B000A6585 /* Example */ = { 284 | isa = PBXGroup; 285 | children = ( 286 | 3D9C43232274629B000A6585 /* AppDelegate.swift */, 287 | 3D9C4333227462B9000A6585 /* Resources */, 288 | ); 289 | path = Example; 290 | sourceTree = ""; 291 | }; 292 | 3D9C4333227462B9000A6585 /* Resources */ = { 293 | isa = PBXGroup; 294 | children = ( 295 | 3D9C432A2274629C000A6585 /* Assets.xcassets */, 296 | 3D9C432C2274629C000A6585 /* LaunchScreen.storyboard */, 297 | 3D9C432F2274629C000A6585 /* Info.plist */, 298 | ); 299 | path = Resources; 300 | sourceTree = ""; 301 | }; 302 | BDB3A59F236EF19B0041D167 /* String */ = { 303 | isa = PBXGroup; 304 | children = ( 305 | FF5EFC82236EF301005134D1 /* StringIndex.swift */, 306 | 3D9C42A122745900000A6585 /* AGString.swift */, 307 | FF4F190B236F126000A0CD30 /* Utility.swift */, 308 | ); 309 | path = String; 310 | sourceTree = ""; 311 | }; 312 | BDB3A5A0236EF1A20041D167 /* Regex */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | BDB3A5A1236EF1B30041D167 /* AGRegex.swift */, 316 | BD02777323701C86007DCFB6 /* AGMatch.swift */, 317 | BDDA016123703F820001AF7C /* AGMatchListIterator.swift */, 318 | FF6C86D12372D77B004C83A0 /* String+NSRange.swift */, 319 | FF2593D9237827DE003C3B1F /* AGMatchList.swift */, 320 | FFEFD69F23796E4200B17B4A /* AGMatchLazyList.swift */, 321 | FFEFD6A123796EDE00B17B4A /* AGMatchLazyListIterator.swift */, 322 | ); 323 | path = Regex; 324 | sourceTree = ""; 325 | }; 326 | /* End PBXGroup section */ 327 | 328 | /* Begin PBXHeadersBuildPhase section */ 329 | 3D9C428B22745894000A6585 /* Headers */ = { 330 | isa = PBXHeadersBuildPhase; 331 | buildActionMask = 2147483647; 332 | files = ( 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | 3D9C42A42274599D000A6585 /* Headers */ = { 337 | isa = PBXHeadersBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | }; 343 | 3D9C42B2227459D6000A6585 /* Headers */ = { 344 | isa = PBXHeadersBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | 3D9C42C022745A07000A6585 /* Headers */ = { 351 | isa = PBXHeadersBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | ); 355 | runOnlyForDeploymentPostprocessing = 0; 356 | }; 357 | /* End PBXHeadersBuildPhase section */ 358 | 359 | /* Begin PBXNativeTarget section */ 360 | 3D9C428F22745894000A6585 /* AGString-iOS */ = { 361 | isa = PBXNativeTarget; 362 | buildConfigurationList = 3D9C429822745894000A6585 /* Build configuration list for PBXNativeTarget "AGString-iOS" */; 363 | buildPhases = ( 364 | 3D9C428B22745894000A6585 /* Headers */, 365 | 3D9C428C22745894000A6585 /* Sources */, 366 | 3D9C428D22745894000A6585 /* Frameworks */, 367 | 3D9C428E22745894000A6585 /* Resources */, 368 | 3D9C42CE22745AEA000A6585 /* Run SwiftLint */, 369 | ); 370 | buildRules = ( 371 | ); 372 | dependencies = ( 373 | ); 374 | name = "AGString-iOS"; 375 | productName = AGString; 376 | productReference = 3D9C429022745894000A6585 /* AGString.framework */; 377 | productType = "com.apple.product-type.framework"; 378 | }; 379 | 3D9C42A82274599D000A6585 /* AGString-tvOS */ = { 380 | isa = PBXNativeTarget; 381 | buildConfigurationList = 3D9C42AE2274599D000A6585 /* Build configuration list for PBXNativeTarget "AGString-tvOS" */; 382 | buildPhases = ( 383 | 3D9C42A42274599D000A6585 /* Headers */, 384 | 3D9C42A52274599D000A6585 /* Sources */, 385 | 3D9C42A62274599D000A6585 /* Frameworks */, 386 | 3D9C42A72274599D000A6585 /* Resources */, 387 | 3D9C42CF22745AF5000A6585 /* Run SwiftLint */, 388 | ); 389 | buildRules = ( 390 | ); 391 | dependencies = ( 392 | ); 393 | name = "AGString-tvOS"; 394 | productName = "AGString-tvOS"; 395 | productReference = 3D9C42A92274599D000A6585 /* AGString.framework */; 396 | productType = "com.apple.product-type.framework"; 397 | }; 398 | 3D9C42B6227459D6000A6585 /* AGString-watchOS */ = { 399 | isa = PBXNativeTarget; 400 | buildConfigurationList = 3D9C42BC227459D6000A6585 /* Build configuration list for PBXNativeTarget "AGString-watchOS" */; 401 | buildPhases = ( 402 | 3D9C42B2227459D6000A6585 /* Headers */, 403 | 3D9C42B3227459D6000A6585 /* Sources */, 404 | 3D9C42B4227459D6000A6585 /* Frameworks */, 405 | 3D9C42B5227459D6000A6585 /* Resources */, 406 | 3D9C42D022745AFE000A6585 /* Run SwiftLint */, 407 | ); 408 | buildRules = ( 409 | ); 410 | dependencies = ( 411 | ); 412 | name = "AGString-watchOS"; 413 | productName = "AGString-watchOS"; 414 | productReference = 3D9C42B7227459D6000A6585 /* AGString.framework */; 415 | productType = "com.apple.product-type.framework"; 416 | }; 417 | 3D9C42C422745A07000A6585 /* AGString-macOS */ = { 418 | isa = PBXNativeTarget; 419 | buildConfigurationList = 3D9C42CA22745A07000A6585 /* Build configuration list for PBXNativeTarget "AGString-macOS" */; 420 | buildPhases = ( 421 | 3D9C42C022745A07000A6585 /* Headers */, 422 | 3D9C42C122745A07000A6585 /* Sources */, 423 | 3D9C42C222745A07000A6585 /* Frameworks */, 424 | 3D9C42C322745A07000A6585 /* Resources */, 425 | 3D9C42D122745B08000A6585 /* Run SwiftLint */, 426 | ); 427 | buildRules = ( 428 | ); 429 | dependencies = ( 430 | ); 431 | name = "AGString-macOS"; 432 | productName = "AGString-macOS"; 433 | productReference = 3D9C42C522745A07000A6585 /* AGString.framework */; 434 | productType = "com.apple.product-type.framework"; 435 | }; 436 | 3D9C42F02274604A000A6585 /* AGString-iOSTests */ = { 437 | isa = PBXNativeTarget; 438 | buildConfigurationList = 3D9C42F92274604A000A6585 /* Build configuration list for PBXNativeTarget "AGString-iOSTests" */; 439 | buildPhases = ( 440 | 3D9C42ED2274604A000A6585 /* Sources */, 441 | 3D9C42EE2274604A000A6585 /* Frameworks */, 442 | 3D9C42EF2274604A000A6585 /* Resources */, 443 | ); 444 | buildRules = ( 445 | ); 446 | dependencies = ( 447 | 3D9C42F82274604A000A6585 /* PBXTargetDependency */, 448 | ); 449 | name = "AGString-iOSTests"; 450 | productName = "AGString-iOSTests"; 451 | productReference = 3D9C42F12274604A000A6585 /* AGString-iOSTests.xctest */; 452 | productType = "com.apple.product-type.bundle.unit-test"; 453 | }; 454 | 3D9C43002274611B000A6585 /* AGString-tvOSTests */ = { 455 | isa = PBXNativeTarget; 456 | buildConfigurationList = 3D9C43092274611B000A6585 /* Build configuration list for PBXNativeTarget "AGString-tvOSTests" */; 457 | buildPhases = ( 458 | 3D9C42FD2274611B000A6585 /* Sources */, 459 | 3D9C42FE2274611B000A6585 /* Frameworks */, 460 | 3D9C42FF2274611B000A6585 /* Resources */, 461 | ); 462 | buildRules = ( 463 | ); 464 | dependencies = ( 465 | 3D9C43082274611B000A6585 /* PBXTargetDependency */, 466 | ); 467 | name = "AGString-tvOSTests"; 468 | productName = "AGString-tvOSTests"; 469 | productReference = 3D9C43012274611B000A6585 /* AGString-tvOSTests.xctest */; 470 | productType = "com.apple.product-type.bundle.unit-test"; 471 | }; 472 | 3D9C431022746198000A6585 /* AGString-macOSTests */ = { 473 | isa = PBXNativeTarget; 474 | buildConfigurationList = 3D9C431922746198000A6585 /* Build configuration list for PBXNativeTarget "AGString-macOSTests" */; 475 | buildPhases = ( 476 | 3D9C430D22746198000A6585 /* Sources */, 477 | 3D9C430E22746198000A6585 /* Frameworks */, 478 | 3D9C430F22746198000A6585 /* Resources */, 479 | ); 480 | buildRules = ( 481 | ); 482 | dependencies = ( 483 | 3D9C431822746198000A6585 /* PBXTargetDependency */, 484 | ); 485 | name = "AGString-macOSTests"; 486 | productName = "AGString-macOSTests"; 487 | productReference = 3D9C431122746198000A6585 /* AGString-macOSTests.xctest */; 488 | productType = "com.apple.product-type.bundle.unit-test"; 489 | }; 490 | 3D9C43202274629B000A6585 /* Example */ = { 491 | isa = PBXNativeTarget; 492 | buildConfigurationList = 3D9C43302274629C000A6585 /* Build configuration list for PBXNativeTarget "Example" */; 493 | buildPhases = ( 494 | 3D9C431D2274629B000A6585 /* Sources */, 495 | 3D9C431E2274629B000A6585 /* Frameworks */, 496 | 3D9C431F2274629B000A6585 /* Resources */, 497 | 3D9C433822746323000A6585 /* Embed Frameworks */, 498 | ); 499 | buildRules = ( 500 | ); 501 | dependencies = ( 502 | 3D9C433722746323000A6585 /* PBXTargetDependency */, 503 | ); 504 | name = Example; 505 | productName = Example; 506 | productReference = 3D9C43212274629B000A6585 /* Example.app */; 507 | productType = "com.apple.product-type.application"; 508 | }; 509 | /* End PBXNativeTarget section */ 510 | 511 | /* Begin PBXProject section */ 512 | 3D9C428722745894000A6585 /* Project object */ = { 513 | isa = PBXProject; 514 | attributes = { 515 | LastSwiftUpdateCheck = 1020; 516 | LastUpgradeCheck = 1020; 517 | ORGANIZATIONNAME = AGString; 518 | TargetAttributes = { 519 | 3D9C428F22745894000A6585 = { 520 | CreatedOnToolsVersion = 10.2.1; 521 | LastSwiftMigration = 1020; 522 | }; 523 | 3D9C42A82274599D000A6585 = { 524 | CreatedOnToolsVersion = 10.2.1; 525 | }; 526 | 3D9C42B6227459D6000A6585 = { 527 | CreatedOnToolsVersion = 10.2.1; 528 | }; 529 | 3D9C42C422745A07000A6585 = { 530 | CreatedOnToolsVersion = 10.2.1; 531 | }; 532 | 3D9C42F02274604A000A6585 = { 533 | CreatedOnToolsVersion = 10.2.1; 534 | }; 535 | 3D9C43002274611B000A6585 = { 536 | CreatedOnToolsVersion = 10.2.1; 537 | }; 538 | 3D9C431022746198000A6585 = { 539 | CreatedOnToolsVersion = 10.2.1; 540 | }; 541 | 3D9C43202274629B000A6585 = { 542 | CreatedOnToolsVersion = 10.2.1; 543 | }; 544 | }; 545 | }; 546 | buildConfigurationList = 3D9C428A22745894000A6585 /* Build configuration list for PBXProject "AGString" */; 547 | compatibilityVersion = "Xcode 9.3"; 548 | developmentRegion = en; 549 | hasScannedForEncodings = 0; 550 | knownRegions = ( 551 | en, 552 | Base, 553 | ); 554 | mainGroup = 3D9C428622745894000A6585; 555 | productRefGroup = 3D9C429122745894000A6585 /* Products */; 556 | projectDirPath = ""; 557 | projectRoot = ""; 558 | targets = ( 559 | 3D9C428F22745894000A6585 /* AGString-iOS */, 560 | 3D9C42A82274599D000A6585 /* AGString-tvOS */, 561 | 3D9C42B6227459D6000A6585 /* AGString-watchOS */, 562 | 3D9C42C422745A07000A6585 /* AGString-macOS */, 563 | 3D9C42F02274604A000A6585 /* AGString-iOSTests */, 564 | 3D9C43002274611B000A6585 /* AGString-tvOSTests */, 565 | 3D9C431022746198000A6585 /* AGString-macOSTests */, 566 | 3D9C43202274629B000A6585 /* Example */, 567 | ); 568 | }; 569 | /* End PBXProject section */ 570 | 571 | /* Begin PBXResourcesBuildPhase section */ 572 | 3D9C428E22745894000A6585 /* Resources */ = { 573 | isa = PBXResourcesBuildPhase; 574 | buildActionMask = 2147483647; 575 | files = ( 576 | ); 577 | runOnlyForDeploymentPostprocessing = 0; 578 | }; 579 | 3D9C42A72274599D000A6585 /* Resources */ = { 580 | isa = PBXResourcesBuildPhase; 581 | buildActionMask = 2147483647; 582 | files = ( 583 | ); 584 | runOnlyForDeploymentPostprocessing = 0; 585 | }; 586 | 3D9C42B5227459D6000A6585 /* Resources */ = { 587 | isa = PBXResourcesBuildPhase; 588 | buildActionMask = 2147483647; 589 | files = ( 590 | ); 591 | runOnlyForDeploymentPostprocessing = 0; 592 | }; 593 | 3D9C42C322745A07000A6585 /* Resources */ = { 594 | isa = PBXResourcesBuildPhase; 595 | buildActionMask = 2147483647; 596 | files = ( 597 | ); 598 | runOnlyForDeploymentPostprocessing = 0; 599 | }; 600 | 3D9C42EF2274604A000A6585 /* Resources */ = { 601 | isa = PBXResourcesBuildPhase; 602 | buildActionMask = 2147483647; 603 | files = ( 604 | ); 605 | runOnlyForDeploymentPostprocessing = 0; 606 | }; 607 | 3D9C42FF2274611B000A6585 /* Resources */ = { 608 | isa = PBXResourcesBuildPhase; 609 | buildActionMask = 2147483647; 610 | files = ( 611 | ); 612 | runOnlyForDeploymentPostprocessing = 0; 613 | }; 614 | 3D9C430F22746198000A6585 /* Resources */ = { 615 | isa = PBXResourcesBuildPhase; 616 | buildActionMask = 2147483647; 617 | files = ( 618 | ); 619 | runOnlyForDeploymentPostprocessing = 0; 620 | }; 621 | 3D9C431F2274629B000A6585 /* Resources */ = { 622 | isa = PBXResourcesBuildPhase; 623 | buildActionMask = 2147483647; 624 | files = ( 625 | 3D9C432E2274629C000A6585 /* LaunchScreen.storyboard in Resources */, 626 | 3D9C432B2274629C000A6585 /* Assets.xcassets in Resources */, 627 | ); 628 | runOnlyForDeploymentPostprocessing = 0; 629 | }; 630 | /* End PBXResourcesBuildPhase section */ 631 | 632 | /* Begin PBXShellScriptBuildPhase section */ 633 | 3D9C42CE22745AEA000A6585 /* Run SwiftLint */ = { 634 | isa = PBXShellScriptBuildPhase; 635 | buildActionMask = 2147483647; 636 | files = ( 637 | ); 638 | inputFileListPaths = ( 639 | ); 640 | inputPaths = ( 641 | ); 642 | name = "Run SwiftLint"; 643 | outputFileListPaths = ( 644 | ); 645 | outputPaths = ( 646 | ); 647 | runOnlyForDeploymentPostprocessing = 0; 648 | shellPath = /bin/sh; 649 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 650 | }; 651 | 3D9C42CF22745AF5000A6585 /* Run SwiftLint */ = { 652 | isa = PBXShellScriptBuildPhase; 653 | buildActionMask = 2147483647; 654 | files = ( 655 | ); 656 | inputFileListPaths = ( 657 | ); 658 | inputPaths = ( 659 | ); 660 | name = "Run SwiftLint"; 661 | outputFileListPaths = ( 662 | ); 663 | outputPaths = ( 664 | ); 665 | runOnlyForDeploymentPostprocessing = 0; 666 | shellPath = /bin/sh; 667 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 668 | }; 669 | 3D9C42D022745AFE000A6585 /* Run SwiftLint */ = { 670 | isa = PBXShellScriptBuildPhase; 671 | buildActionMask = 2147483647; 672 | files = ( 673 | ); 674 | inputFileListPaths = ( 675 | ); 676 | inputPaths = ( 677 | ); 678 | name = "Run SwiftLint"; 679 | outputFileListPaths = ( 680 | ); 681 | outputPaths = ( 682 | ); 683 | runOnlyForDeploymentPostprocessing = 0; 684 | shellPath = /bin/sh; 685 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 686 | }; 687 | 3D9C42D122745B08000A6585 /* Run SwiftLint */ = { 688 | isa = PBXShellScriptBuildPhase; 689 | buildActionMask = 2147483647; 690 | files = ( 691 | ); 692 | inputFileListPaths = ( 693 | ); 694 | inputPaths = ( 695 | ); 696 | name = "Run SwiftLint"; 697 | outputFileListPaths = ( 698 | ); 699 | outputPaths = ( 700 | ); 701 | runOnlyForDeploymentPostprocessing = 0; 702 | shellPath = /bin/sh; 703 | shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; 704 | }; 705 | /* End PBXShellScriptBuildPhase section */ 706 | 707 | /* Begin PBXSourcesBuildPhase section */ 708 | 3D9C428C22745894000A6585 /* Sources */ = { 709 | isa = PBXSourcesBuildPhase; 710 | buildActionMask = 2147483647; 711 | files = ( 712 | FF4F190C236F126000A0CD30 /* Utility.swift in Sources */, 713 | BDDA016223703F820001AF7C /* AGMatchListIterator.swift in Sources */, 714 | FF5EFC83236EF301005134D1 /* StringIndex.swift in Sources */, 715 | BD02777423701C86007DCFB6 /* AGMatch.swift in Sources */, 716 | FFEFD6A223796EDE00B17B4A /* AGMatchLazyListIterator.swift in Sources */, 717 | 3D9C42A222745900000A6585 /* AGString.swift in Sources */, 718 | FF2593DA237827DE003C3B1F /* AGMatchList.swift in Sources */, 719 | FF6C86D22372D77B004C83A0 /* String+NSRange.swift in Sources */, 720 | BDB3A5A2236EF1B30041D167 /* AGRegex.swift in Sources */, 721 | FFEFD6A023796E4200B17B4A /* AGMatchLazyList.swift in Sources */, 722 | ); 723 | runOnlyForDeploymentPostprocessing = 0; 724 | }; 725 | 3D9C42A52274599D000A6585 /* Sources */ = { 726 | isa = PBXSourcesBuildPhase; 727 | buildActionMask = 2147483647; 728 | files = ( 729 | 2FBE39ED2377C7B700D65251 /* AGRegex.swift in Sources */, 730 | FFEFD6A5237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */, 731 | 2FBE39EE2377C7B700D65251 /* AGMatch.swift in Sources */, 732 | 2FBE39EF2377C7B700D65251 /* AGMatchListIterator.swift in Sources */, 733 | 2FBE39F02377C7B700D65251 /* String+NSRange.swift in Sources */, 734 | 2FBE39F12377C7B700D65251 /* StringIndex.swift in Sources */, 735 | FF2593DB237827E5003C3B1F /* AGMatchList.swift in Sources */, 736 | 2FBE39F22377C7B700D65251 /* Utility.swift in Sources */, 737 | 3D9C42B1227459C1000A6585 /* AGString.swift in Sources */, 738 | FFEFD6A8237984E000B17B4A /* AGMatchLazyList.swift in Sources */, 739 | ); 740 | runOnlyForDeploymentPostprocessing = 0; 741 | }; 742 | 3D9C42B3227459D6000A6585 /* Sources */ = { 743 | isa = PBXSourcesBuildPhase; 744 | buildActionMask = 2147483647; 745 | files = ( 746 | 2FBE39F32377C7C000D65251 /* AGRegex.swift in Sources */, 747 | FFEFD6A6237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */, 748 | 2FBE39F42377C7C000D65251 /* AGMatch.swift in Sources */, 749 | 2FBE39F52377C7C000D65251 /* AGMatchListIterator.swift in Sources */, 750 | 2FBE39F62377C7C000D65251 /* String+NSRange.swift in Sources */, 751 | 2FBE39F72377C7C000D65251 /* StringIndex.swift in Sources */, 752 | FF2593DC237827E5003C3B1F /* AGMatchList.swift in Sources */, 753 | 2FBE39F82377C7C000D65251 /* Utility.swift in Sources */, 754 | 3D9C42BF227459F6000A6585 /* AGString.swift in Sources */, 755 | FFEFD6A9237984E000B17B4A /* AGMatchLazyList.swift in Sources */, 756 | ); 757 | runOnlyForDeploymentPostprocessing = 0; 758 | }; 759 | 3D9C42C122745A07000A6585 /* Sources */ = { 760 | isa = PBXSourcesBuildPhase; 761 | buildActionMask = 2147483647; 762 | files = ( 763 | 2FBE39F92377C7C600D65251 /* AGRegex.swift in Sources */, 764 | FFEFD6A7237984DE00B17B4A /* AGMatchLazyListIterator.swift in Sources */, 765 | 2FBE39FA2377C7C600D65251 /* AGMatch.swift in Sources */, 766 | 2FBE39FB2377C7C600D65251 /* AGMatchListIterator.swift in Sources */, 767 | 2FBE39FC2377C7C600D65251 /* String+NSRange.swift in Sources */, 768 | 2FBE39FD2377C7C600D65251 /* StringIndex.swift in Sources */, 769 | FF2593DD237827E5003C3B1F /* AGMatchList.swift in Sources */, 770 | 2FBE39FE2377C7C600D65251 /* Utility.swift in Sources */, 771 | 3D9C42CD22745A28000A6585 /* AGString.swift in Sources */, 772 | FFEFD6AA237984E100B17B4A /* AGMatchLazyList.swift in Sources */, 773 | ); 774 | runOnlyForDeploymentPostprocessing = 0; 775 | }; 776 | 3D9C42ED2274604A000A6585 /* Sources */ = { 777 | isa = PBXSourcesBuildPhase; 778 | buildActionMask = 2147483647; 779 | files = ( 780 | BD02777723701DAE007DCFB6 /* AGRegexTest.swift in Sources */, 781 | 3D9C42FC22746078000A6585 /* AGStringTests.swift in Sources */, 782 | ); 783 | runOnlyForDeploymentPostprocessing = 0; 784 | }; 785 | 3D9C42FD2274611B000A6585 /* Sources */ = { 786 | isa = PBXSourcesBuildPhase; 787 | buildActionMask = 2147483647; 788 | files = ( 789 | BD02777823701DB4007DCFB6 /* AGRegexTest.swift in Sources */, 790 | 3D9C430C22746131000A6585 /* AGStringTests.swift in Sources */, 791 | ); 792 | runOnlyForDeploymentPostprocessing = 0; 793 | }; 794 | 3D9C430D22746198000A6585 /* Sources */ = { 795 | isa = PBXSourcesBuildPhase; 796 | buildActionMask = 2147483647; 797 | files = ( 798 | BD02777923701DB7007DCFB6 /* AGRegexTest.swift in Sources */, 799 | 3D9C431C227461AF000A6585 /* AGStringTests.swift in Sources */, 800 | ); 801 | runOnlyForDeploymentPostprocessing = 0; 802 | }; 803 | 3D9C431D2274629B000A6585 /* Sources */ = { 804 | isa = PBXSourcesBuildPhase; 805 | buildActionMask = 2147483647; 806 | files = ( 807 | 3D9C43242274629B000A6585 /* AppDelegate.swift in Sources */, 808 | ); 809 | runOnlyForDeploymentPostprocessing = 0; 810 | }; 811 | /* End PBXSourcesBuildPhase section */ 812 | 813 | /* Begin PBXTargetDependency section */ 814 | 3D9C42F82274604A000A6585 /* PBXTargetDependency */ = { 815 | isa = PBXTargetDependency; 816 | target = 3D9C428F22745894000A6585 /* AGString-iOS */; 817 | targetProxy = 3D9C42F72274604A000A6585 /* PBXContainerItemProxy */; 818 | }; 819 | 3D9C43082274611B000A6585 /* PBXTargetDependency */ = { 820 | isa = PBXTargetDependency; 821 | target = 3D9C42A82274599D000A6585 /* AGString-tvOS */; 822 | targetProxy = 3D9C43072274611B000A6585 /* PBXContainerItemProxy */; 823 | }; 824 | 3D9C431822746198000A6585 /* PBXTargetDependency */ = { 825 | isa = PBXTargetDependency; 826 | target = 3D9C42C422745A07000A6585 /* AGString-macOS */; 827 | targetProxy = 3D9C431722746198000A6585 /* PBXContainerItemProxy */; 828 | }; 829 | 3D9C433722746323000A6585 /* PBXTargetDependency */ = { 830 | isa = PBXTargetDependency; 831 | target = 3D9C428F22745894000A6585 /* AGString-iOS */; 832 | targetProxy = 3D9C433622746323000A6585 /* PBXContainerItemProxy */; 833 | }; 834 | /* End PBXTargetDependency section */ 835 | 836 | /* Begin PBXVariantGroup section */ 837 | 3D9C432C2274629C000A6585 /* LaunchScreen.storyboard */ = { 838 | isa = PBXVariantGroup; 839 | children = ( 840 | 3D9C432D2274629C000A6585 /* Base */, 841 | ); 842 | name = LaunchScreen.storyboard; 843 | sourceTree = ""; 844 | }; 845 | /* End PBXVariantGroup section */ 846 | 847 | /* Begin XCBuildConfiguration section */ 848 | 3D9C429622745894000A6585 /* Debug */ = { 849 | isa = XCBuildConfiguration; 850 | buildSettings = { 851 | ALWAYS_SEARCH_USER_PATHS = NO; 852 | CLANG_ANALYZER_NONNULL = YES; 853 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 854 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 855 | CLANG_CXX_LIBRARY = "libc++"; 856 | CLANG_ENABLE_MODULES = YES; 857 | CLANG_ENABLE_OBJC_ARC = YES; 858 | CLANG_ENABLE_OBJC_WEAK = YES; 859 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 860 | CLANG_WARN_BOOL_CONVERSION = YES; 861 | CLANG_WARN_COMMA = YES; 862 | CLANG_WARN_CONSTANT_CONVERSION = YES; 863 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 864 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 865 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 866 | CLANG_WARN_EMPTY_BODY = YES; 867 | CLANG_WARN_ENUM_CONVERSION = YES; 868 | CLANG_WARN_INFINITE_RECURSION = YES; 869 | CLANG_WARN_INT_CONVERSION = YES; 870 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 871 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 872 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 873 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 874 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 875 | CLANG_WARN_STRICT_PROTOTYPES = YES; 876 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 877 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 878 | CLANG_WARN_UNREACHABLE_CODE = YES; 879 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 880 | CODE_SIGN_IDENTITY = "iPhone Developer"; 881 | COPY_PHASE_STRIP = NO; 882 | CURRENT_PROJECT_VERSION = 1; 883 | DEBUG_INFORMATION_FORMAT = dwarf; 884 | ENABLE_STRICT_OBJC_MSGSEND = YES; 885 | ENABLE_TESTABILITY = YES; 886 | GCC_C_LANGUAGE_STANDARD = gnu11; 887 | GCC_DYNAMIC_NO_PIC = NO; 888 | GCC_NO_COMMON_BLOCKS = YES; 889 | GCC_OPTIMIZATION_LEVEL = 0; 890 | GCC_PREPROCESSOR_DEFINITIONS = ( 891 | "DEBUG=1", 892 | "$(inherited)", 893 | ); 894 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 895 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 896 | GCC_WARN_UNDECLARED_SELECTOR = YES; 897 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 898 | GCC_WARN_UNUSED_FUNCTION = YES; 899 | GCC_WARN_UNUSED_VARIABLE = YES; 900 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 901 | MACOSX_DEPLOYMENT_TARGET = 10.10; 902 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 903 | MTL_FAST_MATH = YES; 904 | ONLY_ACTIVE_ARCH = YES; 905 | SDKROOT = iphoneos; 906 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 907 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 908 | SWIFT_VERSION = 5.0; 909 | VERSIONING_SYSTEM = "apple-generic"; 910 | VERSION_INFO_PREFIX = ""; 911 | }; 912 | name = Debug; 913 | }; 914 | 3D9C429722745894000A6585 /* Release */ = { 915 | isa = XCBuildConfiguration; 916 | buildSettings = { 917 | ALWAYS_SEARCH_USER_PATHS = NO; 918 | CLANG_ANALYZER_NONNULL = YES; 919 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 920 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 921 | CLANG_CXX_LIBRARY = "libc++"; 922 | CLANG_ENABLE_MODULES = YES; 923 | CLANG_ENABLE_OBJC_ARC = YES; 924 | CLANG_ENABLE_OBJC_WEAK = YES; 925 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 926 | CLANG_WARN_BOOL_CONVERSION = YES; 927 | CLANG_WARN_COMMA = YES; 928 | CLANG_WARN_CONSTANT_CONVERSION = YES; 929 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 930 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 931 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 932 | CLANG_WARN_EMPTY_BODY = YES; 933 | CLANG_WARN_ENUM_CONVERSION = YES; 934 | CLANG_WARN_INFINITE_RECURSION = YES; 935 | CLANG_WARN_INT_CONVERSION = YES; 936 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 937 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 938 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 939 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 940 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 941 | CLANG_WARN_STRICT_PROTOTYPES = YES; 942 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 943 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 944 | CLANG_WARN_UNREACHABLE_CODE = YES; 945 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 946 | CODE_SIGN_IDENTITY = "iPhone Developer"; 947 | COPY_PHASE_STRIP = NO; 948 | CURRENT_PROJECT_VERSION = 1; 949 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 950 | ENABLE_NS_ASSERTIONS = NO; 951 | ENABLE_STRICT_OBJC_MSGSEND = YES; 952 | GCC_C_LANGUAGE_STANDARD = gnu11; 953 | GCC_NO_COMMON_BLOCKS = YES; 954 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 955 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 956 | GCC_WARN_UNDECLARED_SELECTOR = YES; 957 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 958 | GCC_WARN_UNUSED_FUNCTION = YES; 959 | GCC_WARN_UNUSED_VARIABLE = YES; 960 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 961 | MACOSX_DEPLOYMENT_TARGET = 10.10; 962 | MTL_ENABLE_DEBUG_INFO = NO; 963 | MTL_FAST_MATH = YES; 964 | SDKROOT = iphoneos; 965 | SWIFT_COMPILATION_MODE = wholemodule; 966 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 967 | SWIFT_VERSION = 5.0; 968 | VALIDATE_PRODUCT = YES; 969 | VERSIONING_SYSTEM = "apple-generic"; 970 | VERSION_INFO_PREFIX = ""; 971 | }; 972 | name = Release; 973 | }; 974 | 3D9C429922745894000A6585 /* Debug */ = { 975 | isa = XCBuildConfiguration; 976 | buildSettings = { 977 | APPLICATION_EXTENSION_API_ONLY = YES; 978 | CLANG_ENABLE_MODULES = YES; 979 | CODE_SIGN_IDENTITY = ""; 980 | CODE_SIGN_STYLE = Manual; 981 | DEFINES_MODULE = YES; 982 | DEVELOPMENT_TEAM = ""; 983 | DYLIB_COMPATIBILITY_VERSION = 1; 984 | DYLIB_CURRENT_VERSION = 1; 985 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 986 | INFOPLIST_FILE = Configs/AGString.plist; 987 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 988 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 989 | LD_RUNPATH_SEARCH_PATHS = ( 990 | "$(inherited)", 991 | "@executable_path/Frameworks", 992 | "@loader_path/Frameworks", 993 | ); 994 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-iOS"; 995 | PRODUCT_NAME = AGString; 996 | PROVISIONING_PROFILE_SPECIFIER = ""; 997 | SKIP_INSTALL = YES; 998 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 999 | SWIFT_VERSION = 5.0; 1000 | TARGETED_DEVICE_FAMILY = "1,2"; 1001 | }; 1002 | name = Debug; 1003 | }; 1004 | 3D9C429A22745894000A6585 /* Release */ = { 1005 | isa = XCBuildConfiguration; 1006 | buildSettings = { 1007 | APPLICATION_EXTENSION_API_ONLY = YES; 1008 | CLANG_ENABLE_MODULES = YES; 1009 | CODE_SIGN_IDENTITY = ""; 1010 | CODE_SIGN_STYLE = Manual; 1011 | DEFINES_MODULE = YES; 1012 | DEVELOPMENT_TEAM = ""; 1013 | DYLIB_COMPATIBILITY_VERSION = 1; 1014 | DYLIB_CURRENT_VERSION = 1; 1015 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1016 | INFOPLIST_FILE = Configs/AGString.plist; 1017 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1018 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1019 | LD_RUNPATH_SEARCH_PATHS = ( 1020 | "$(inherited)", 1021 | "@executable_path/Frameworks", 1022 | "@loader_path/Frameworks", 1023 | ); 1024 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-iOS"; 1025 | PRODUCT_NAME = AGString; 1026 | PROVISIONING_PROFILE_SPECIFIER = ""; 1027 | SKIP_INSTALL = YES; 1028 | SWIFT_VERSION = 5.0; 1029 | TARGETED_DEVICE_FAMILY = "1,2"; 1030 | }; 1031 | name = Release; 1032 | }; 1033 | 3D9C42AF2274599D000A6585 /* Debug */ = { 1034 | isa = XCBuildConfiguration; 1035 | buildSettings = { 1036 | APPLICATION_EXTENSION_API_ONLY = YES; 1037 | CODE_SIGN_IDENTITY = ""; 1038 | CODE_SIGN_STYLE = Manual; 1039 | DEFINES_MODULE = YES; 1040 | DEVELOPMENT_TEAM = ""; 1041 | DYLIB_COMPATIBILITY_VERSION = 1; 1042 | DYLIB_CURRENT_VERSION = 1; 1043 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1044 | INFOPLIST_FILE = Configs/AGString.plist; 1045 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1046 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1047 | LD_RUNPATH_SEARCH_PATHS = ( 1048 | "$(inherited)", 1049 | "@executable_path/Frameworks", 1050 | "@loader_path/Frameworks", 1051 | ); 1052 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-tvOS"; 1053 | PRODUCT_NAME = AGString; 1054 | PROVISIONING_PROFILE_SPECIFIER = ""; 1055 | SDKROOT = appletvos; 1056 | SKIP_INSTALL = YES; 1057 | SWIFT_VERSION = 5.0; 1058 | TARGETED_DEVICE_FAMILY = 3; 1059 | TVOS_DEPLOYMENT_TARGET = 9.0; 1060 | }; 1061 | name = Debug; 1062 | }; 1063 | 3D9C42B02274599D000A6585 /* Release */ = { 1064 | isa = XCBuildConfiguration; 1065 | buildSettings = { 1066 | APPLICATION_EXTENSION_API_ONLY = YES; 1067 | CODE_SIGN_IDENTITY = ""; 1068 | CODE_SIGN_STYLE = Manual; 1069 | DEFINES_MODULE = YES; 1070 | DEVELOPMENT_TEAM = ""; 1071 | DYLIB_COMPATIBILITY_VERSION = 1; 1072 | DYLIB_CURRENT_VERSION = 1; 1073 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1074 | INFOPLIST_FILE = Configs/AGString.plist; 1075 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1076 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1077 | LD_RUNPATH_SEARCH_PATHS = ( 1078 | "$(inherited)", 1079 | "@executable_path/Frameworks", 1080 | "@loader_path/Frameworks", 1081 | ); 1082 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-tvOS"; 1083 | PRODUCT_NAME = AGString; 1084 | PROVISIONING_PROFILE_SPECIFIER = ""; 1085 | SDKROOT = appletvos; 1086 | SKIP_INSTALL = YES; 1087 | SWIFT_VERSION = 5.0; 1088 | TARGETED_DEVICE_FAMILY = 3; 1089 | TVOS_DEPLOYMENT_TARGET = 9.0; 1090 | }; 1091 | name = Release; 1092 | }; 1093 | 3D9C42BD227459D6000A6585 /* Debug */ = { 1094 | isa = XCBuildConfiguration; 1095 | buildSettings = { 1096 | APPLICATION_EXTENSION_API_ONLY = YES; 1097 | CODE_SIGN_IDENTITY = ""; 1098 | CODE_SIGN_STYLE = Manual; 1099 | DEFINES_MODULE = YES; 1100 | DEVELOPMENT_TEAM = ""; 1101 | DYLIB_COMPATIBILITY_VERSION = 1; 1102 | DYLIB_CURRENT_VERSION = 1; 1103 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1104 | INFOPLIST_FILE = Configs/AGString.plist; 1105 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1106 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1107 | LD_RUNPATH_SEARCH_PATHS = ( 1108 | "$(inherited)", 1109 | "@executable_path/Frameworks", 1110 | "@loader_path/Frameworks", 1111 | ); 1112 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-watchOS"; 1113 | PRODUCT_NAME = AGString; 1114 | PROVISIONING_PROFILE_SPECIFIER = ""; 1115 | SDKROOT = watchos; 1116 | SKIP_INSTALL = YES; 1117 | SWIFT_VERSION = 5.0; 1118 | TARGETED_DEVICE_FAMILY = 4; 1119 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 1120 | }; 1121 | name = Debug; 1122 | }; 1123 | 3D9C42BE227459D6000A6585 /* Release */ = { 1124 | isa = XCBuildConfiguration; 1125 | buildSettings = { 1126 | APPLICATION_EXTENSION_API_ONLY = YES; 1127 | CODE_SIGN_IDENTITY = ""; 1128 | CODE_SIGN_STYLE = Manual; 1129 | DEFINES_MODULE = YES; 1130 | DEVELOPMENT_TEAM = ""; 1131 | DYLIB_COMPATIBILITY_VERSION = 1; 1132 | DYLIB_CURRENT_VERSION = 1; 1133 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1134 | INFOPLIST_FILE = Configs/AGString.plist; 1135 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1136 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1137 | LD_RUNPATH_SEARCH_PATHS = ( 1138 | "$(inherited)", 1139 | "@executable_path/Frameworks", 1140 | "@loader_path/Frameworks", 1141 | ); 1142 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-watchOS"; 1143 | PRODUCT_NAME = AGString; 1144 | PROVISIONING_PROFILE_SPECIFIER = ""; 1145 | SDKROOT = watchos; 1146 | SKIP_INSTALL = YES; 1147 | SWIFT_VERSION = 5.0; 1148 | TARGETED_DEVICE_FAMILY = 4; 1149 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 1150 | }; 1151 | name = Release; 1152 | }; 1153 | 3D9C42CB22745A07000A6585 /* Debug */ = { 1154 | isa = XCBuildConfiguration; 1155 | buildSettings = { 1156 | APPLICATION_EXTENSION_API_ONLY = YES; 1157 | CODE_SIGN_IDENTITY = "-"; 1158 | CODE_SIGN_STYLE = Manual; 1159 | COMBINE_HIDPI_IMAGES = YES; 1160 | DEFINES_MODULE = YES; 1161 | DEVELOPMENT_TEAM = ""; 1162 | DYLIB_COMPATIBILITY_VERSION = 1; 1163 | DYLIB_CURRENT_VERSION = 1; 1164 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1165 | FRAMEWORK_VERSION = A; 1166 | INFOPLIST_FILE = Configs/AGString.plist; 1167 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1168 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1169 | LD_RUNPATH_SEARCH_PATHS = ( 1170 | "$(inherited)", 1171 | "@executable_path/../Frameworks", 1172 | "@loader_path/Frameworks", 1173 | ); 1174 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1175 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-macOS"; 1176 | PRODUCT_NAME = AGString; 1177 | PROVISIONING_PROFILE_SPECIFIER = ""; 1178 | SDKROOT = macosx; 1179 | SKIP_INSTALL = YES; 1180 | SWIFT_VERSION = 5.0; 1181 | }; 1182 | name = Debug; 1183 | }; 1184 | 3D9C42CC22745A07000A6585 /* Release */ = { 1185 | isa = XCBuildConfiguration; 1186 | buildSettings = { 1187 | APPLICATION_EXTENSION_API_ONLY = YES; 1188 | CODE_SIGN_IDENTITY = "-"; 1189 | CODE_SIGN_STYLE = Manual; 1190 | COMBINE_HIDPI_IMAGES = YES; 1191 | DEFINES_MODULE = YES; 1192 | DEVELOPMENT_TEAM = ""; 1193 | DYLIB_COMPATIBILITY_VERSION = 1; 1194 | DYLIB_CURRENT_VERSION = 1; 1195 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 1196 | FRAMEWORK_VERSION = A; 1197 | INFOPLIST_FILE = Configs/AGString.plist; 1198 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 1199 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1200 | LD_RUNPATH_SEARCH_PATHS = ( 1201 | "$(inherited)", 1202 | "@executable_path/../Frameworks", 1203 | "@loader_path/Frameworks", 1204 | ); 1205 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1206 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-macOS"; 1207 | PRODUCT_NAME = AGString; 1208 | PROVISIONING_PROFILE_SPECIFIER = ""; 1209 | SDKROOT = macosx; 1210 | SKIP_INSTALL = YES; 1211 | SWIFT_VERSION = 5.0; 1212 | }; 1213 | name = Release; 1214 | }; 1215 | 3D9C42FA2274604A000A6585 /* Debug */ = { 1216 | isa = XCBuildConfiguration; 1217 | buildSettings = { 1218 | CODE_SIGN_STYLE = Automatic; 1219 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1220 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1221 | LD_RUNPATH_SEARCH_PATHS = ( 1222 | "$(inherited)", 1223 | "@executable_path/Frameworks", 1224 | "@loader_path/Frameworks", 1225 | ); 1226 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-iOSTests"; 1227 | PRODUCT_NAME = "$(TARGET_NAME)"; 1228 | SWIFT_VERSION = 5.0; 1229 | TARGETED_DEVICE_FAMILY = "1,2"; 1230 | }; 1231 | name = Debug; 1232 | }; 1233 | 3D9C42FB2274604A000A6585 /* Release */ = { 1234 | isa = XCBuildConfiguration; 1235 | buildSettings = { 1236 | CODE_SIGN_STYLE = Automatic; 1237 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1238 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1239 | LD_RUNPATH_SEARCH_PATHS = ( 1240 | "$(inherited)", 1241 | "@executable_path/Frameworks", 1242 | "@loader_path/Frameworks", 1243 | ); 1244 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-iOSTests"; 1245 | PRODUCT_NAME = "$(TARGET_NAME)"; 1246 | SWIFT_VERSION = 5.0; 1247 | TARGETED_DEVICE_FAMILY = "1,2"; 1248 | }; 1249 | name = Release; 1250 | }; 1251 | 3D9C430A2274611B000A6585 /* Debug */ = { 1252 | isa = XCBuildConfiguration; 1253 | buildSettings = { 1254 | CODE_SIGN_STYLE = Automatic; 1255 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1256 | LD_RUNPATH_SEARCH_PATHS = ( 1257 | "$(inherited)", 1258 | "@executable_path/Frameworks", 1259 | "@loader_path/Frameworks", 1260 | ); 1261 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-tvOSTests"; 1262 | PRODUCT_NAME = "$(TARGET_NAME)"; 1263 | SDKROOT = appletvos; 1264 | SWIFT_VERSION = 5.0; 1265 | TARGETED_DEVICE_FAMILY = 3; 1266 | TVOS_DEPLOYMENT_TARGET = 9.0; 1267 | }; 1268 | name = Debug; 1269 | }; 1270 | 3D9C430B2274611B000A6585 /* Release */ = { 1271 | isa = XCBuildConfiguration; 1272 | buildSettings = { 1273 | CODE_SIGN_STYLE = Automatic; 1274 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1275 | LD_RUNPATH_SEARCH_PATHS = ( 1276 | "$(inherited)", 1277 | "@executable_path/Frameworks", 1278 | "@loader_path/Frameworks", 1279 | ); 1280 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-tvOSTests"; 1281 | PRODUCT_NAME = "$(TARGET_NAME)"; 1282 | SDKROOT = appletvos; 1283 | SWIFT_VERSION = 5.0; 1284 | TARGETED_DEVICE_FAMILY = 3; 1285 | TVOS_DEPLOYMENT_TARGET = 9.0; 1286 | }; 1287 | name = Release; 1288 | }; 1289 | 3D9C431A22746198000A6585 /* Debug */ = { 1290 | isa = XCBuildConfiguration; 1291 | buildSettings = { 1292 | CODE_SIGN_IDENTITY = "-"; 1293 | CODE_SIGN_STYLE = Automatic; 1294 | COMBINE_HIDPI_IMAGES = YES; 1295 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1296 | LD_RUNPATH_SEARCH_PATHS = ( 1297 | "$(inherited)", 1298 | "@executable_path/../Frameworks", 1299 | "@loader_path/../Frameworks", 1300 | ); 1301 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1302 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-macOSTests"; 1303 | PRODUCT_NAME = "$(TARGET_NAME)"; 1304 | SDKROOT = macosx; 1305 | SWIFT_VERSION = 5.0; 1306 | }; 1307 | name = Debug; 1308 | }; 1309 | 3D9C431B22746198000A6585 /* Release */ = { 1310 | isa = XCBuildConfiguration; 1311 | buildSettings = { 1312 | CODE_SIGN_IDENTITY = "-"; 1313 | CODE_SIGN_STYLE = Automatic; 1314 | COMBINE_HIDPI_IMAGES = YES; 1315 | INFOPLIST_FILE = Configs/AGStringTests.plist; 1316 | LD_RUNPATH_SEARCH_PATHS = ( 1317 | "$(inherited)", 1318 | "@executable_path/../Frameworks", 1319 | "@loader_path/../Frameworks", 1320 | ); 1321 | MACOSX_DEPLOYMENT_TARGET = 10.10; 1322 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm.AGString-macOSTests"; 1323 | PRODUCT_NAME = "$(TARGET_NAME)"; 1324 | SDKROOT = macosx; 1325 | SWIFT_VERSION = 5.0; 1326 | }; 1327 | name = Release; 1328 | }; 1329 | 3D9C43312274629C000A6585 /* Debug */ = { 1330 | isa = XCBuildConfiguration; 1331 | buildSettings = { 1332 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1333 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1334 | CODE_SIGN_STYLE = Manual; 1335 | DEVELOPMENT_TEAM = ""; 1336 | INFOPLIST_FILE = Example/Resources/Info.plist; 1337 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1338 | LD_RUNPATH_SEARCH_PATHS = ( 1339 | "$(inherited)", 1340 | "@executable_path/Frameworks", 1341 | ); 1342 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm-iOS.Example"; 1343 | PRODUCT_NAME = "$(TARGET_NAME)"; 1344 | PROVISIONING_PROFILE_SPECIFIER = ""; 1345 | SWIFT_VERSION = 5.0; 1346 | TARGETED_DEVICE_FAMILY = "1,2"; 1347 | }; 1348 | name = Debug; 1349 | }; 1350 | 3D9C43322274629C000A6585 /* Release */ = { 1351 | isa = XCBuildConfiguration; 1352 | buildSettings = { 1353 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 1354 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1355 | CODE_SIGN_STYLE = Manual; 1356 | DEVELOPMENT_TEAM = ""; 1357 | INFOPLIST_FILE = Example/Resources/Info.plist; 1358 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 1359 | LD_RUNPATH_SEARCH_PATHS = ( 1360 | "$(inherited)", 1361 | "@executable_path/Frameworks", 1362 | ); 1363 | PRODUCT_BUNDLE_IDENTIFIER = "com.algorithm-iOS.Example"; 1364 | PRODUCT_NAME = "$(TARGET_NAME)"; 1365 | PROVISIONING_PROFILE_SPECIFIER = ""; 1366 | SWIFT_VERSION = 5.0; 1367 | TARGETED_DEVICE_FAMILY = "1,2"; 1368 | }; 1369 | name = Release; 1370 | }; 1371 | /* End XCBuildConfiguration section */ 1372 | 1373 | /* Begin XCConfigurationList section */ 1374 | 3D9C428A22745894000A6585 /* Build configuration list for PBXProject "AGString" */ = { 1375 | isa = XCConfigurationList; 1376 | buildConfigurations = ( 1377 | 3D9C429622745894000A6585 /* Debug */, 1378 | 3D9C429722745894000A6585 /* Release */, 1379 | ); 1380 | defaultConfigurationIsVisible = 0; 1381 | defaultConfigurationName = Release; 1382 | }; 1383 | 3D9C429822745894000A6585 /* Build configuration list for PBXNativeTarget "AGString-iOS" */ = { 1384 | isa = XCConfigurationList; 1385 | buildConfigurations = ( 1386 | 3D9C429922745894000A6585 /* Debug */, 1387 | 3D9C429A22745894000A6585 /* Release */, 1388 | ); 1389 | defaultConfigurationIsVisible = 0; 1390 | defaultConfigurationName = Release; 1391 | }; 1392 | 3D9C42AE2274599D000A6585 /* Build configuration list for PBXNativeTarget "AGString-tvOS" */ = { 1393 | isa = XCConfigurationList; 1394 | buildConfigurations = ( 1395 | 3D9C42AF2274599D000A6585 /* Debug */, 1396 | 3D9C42B02274599D000A6585 /* Release */, 1397 | ); 1398 | defaultConfigurationIsVisible = 0; 1399 | defaultConfigurationName = Release; 1400 | }; 1401 | 3D9C42BC227459D6000A6585 /* Build configuration list for PBXNativeTarget "AGString-watchOS" */ = { 1402 | isa = XCConfigurationList; 1403 | buildConfigurations = ( 1404 | 3D9C42BD227459D6000A6585 /* Debug */, 1405 | 3D9C42BE227459D6000A6585 /* Release */, 1406 | ); 1407 | defaultConfigurationIsVisible = 0; 1408 | defaultConfigurationName = Release; 1409 | }; 1410 | 3D9C42CA22745A07000A6585 /* Build configuration list for PBXNativeTarget "AGString-macOS" */ = { 1411 | isa = XCConfigurationList; 1412 | buildConfigurations = ( 1413 | 3D9C42CB22745A07000A6585 /* Debug */, 1414 | 3D9C42CC22745A07000A6585 /* Release */, 1415 | ); 1416 | defaultConfigurationIsVisible = 0; 1417 | defaultConfigurationName = Release; 1418 | }; 1419 | 3D9C42F92274604A000A6585 /* Build configuration list for PBXNativeTarget "AGString-iOSTests" */ = { 1420 | isa = XCConfigurationList; 1421 | buildConfigurations = ( 1422 | 3D9C42FA2274604A000A6585 /* Debug */, 1423 | 3D9C42FB2274604A000A6585 /* Release */, 1424 | ); 1425 | defaultConfigurationIsVisible = 0; 1426 | defaultConfigurationName = Release; 1427 | }; 1428 | 3D9C43092274611B000A6585 /* Build configuration list for PBXNativeTarget "AGString-tvOSTests" */ = { 1429 | isa = XCConfigurationList; 1430 | buildConfigurations = ( 1431 | 3D9C430A2274611B000A6585 /* Debug */, 1432 | 3D9C430B2274611B000A6585 /* Release */, 1433 | ); 1434 | defaultConfigurationIsVisible = 0; 1435 | defaultConfigurationName = Release; 1436 | }; 1437 | 3D9C431922746198000A6585 /* Build configuration list for PBXNativeTarget "AGString-macOSTests" */ = { 1438 | isa = XCConfigurationList; 1439 | buildConfigurations = ( 1440 | 3D9C431A22746198000A6585 /* Debug */, 1441 | 3D9C431B22746198000A6585 /* Release */, 1442 | ); 1443 | defaultConfigurationIsVisible = 0; 1444 | defaultConfigurationName = Release; 1445 | }; 1446 | 3D9C43302274629C000A6585 /* Build configuration list for PBXNativeTarget "Example" */ = { 1447 | isa = XCConfigurationList; 1448 | buildConfigurations = ( 1449 | 3D9C43312274629C000A6585 /* Debug */, 1450 | 3D9C43322274629C000A6585 /* Release */, 1451 | ); 1452 | defaultConfigurationIsVisible = 0; 1453 | defaultConfigurationName = Release; 1454 | }; 1455 | /* End XCConfigurationList section */ 1456 | }; 1457 | rootObject = 3D9C428722745894000A6585 /* Project object */; 1458 | } 1459 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcbaselines/3D9C42F02274604A000A6585.xcbaseline/3385FEE0-D0B1-4658-A4FC-4F5EA707274C.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | classNames 6 | 7 | AGStringTests 8 | 9 | testLtrim() 10 | 11 | com.apple.XCTPerformanceMetric_WallClockTime 12 | 13 | baselineAverage 14 | 0.000151 15 | baselineIntegrationDisplayName 16 | Local Baseline 17 | 18 | 19 | testOccurence() 20 | 21 | com.apple.XCTPerformanceMetric_WallClockTime 22 | 23 | baselineAverage 24 | 0.0128 25 | baselineIntegrationDisplayName 26 | Local Baseline 27 | 28 | 29 | testRtrim() 30 | 31 | com.apple.XCTPerformanceMetric_WallClockTime 32 | 33 | baselineAverage 34 | 0.000108 35 | baselineIntegrationDisplayName 36 | Local Baseline 37 | 38 | 39 | testTrim() 40 | 41 | com.apple.XCTPerformanceMetric_WallClockTime 42 | 43 | baselineAverage 44 | 4.48e-05 45 | baselineIntegrationDisplayName 46 | Local Baseline 47 | 48 | 49 | testltrim() 50 | 51 | com.apple.XCTPerformanceMetric_WallClockTime 52 | 53 | baselineAverage 54 | 0.00017564 55 | baselineIntegrationDisplayName 56 | Local Baseline 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcbaselines/3D9C42F02274604A000A6585.xcbaseline/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | runDestinationsByUUID 6 | 7 | 3385FEE0-D0B1-4658-A4FC-4F5EA707274C 8 | 9 | localComputer 10 | 11 | busSpeedInMHz 12 | 100 13 | cpuCount 14 | 1 15 | cpuKind 16 | Quad-Core Intel Core i7 17 | cpuSpeedInMHz 18 | 2200 19 | logicalCPUCoresPerPackage 20 | 8 21 | modelCode 22 | MacBookPro11,2 23 | physicalCPUCoresPerPackage 24 | 4 25 | platformIdentifier 26 | com.apple.platform.macosx 27 | 28 | targetArchitecture 29 | x86_64 30 | targetDevice 31 | 32 | modelCode 33 | iPhone12,5 34 | platformIdentifier 35 | com.apple.platform.iphonesimulator 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcschemes/AGString-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 36 | 42 | 43 | 44 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 85 | 86 | 92 | 93 | 94 | 95 | 97 | 98 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcschemes/AGString-macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 36 | 42 | 43 | 44 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 85 | 86 | 92 | 93 | 94 | 95 | 97 | 98 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcschemes/AGString-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 36 | 42 | 43 | 44 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 85 | 86 | 92 | 93 | 94 | 95 | 97 | 98 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /AGString.xcodeproj/xcshareddata/xcschemes/AGString-watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 46 | 47 | 53 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 71 | 72 | 73 | 74 | 76 | 77 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Configs/AGString.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | AGString 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | NSHumanReadableCopyright 26 | Copyright © 2019 AGString. All rights reserved. 27 | NSPrincipalClass 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Configs/AGStringTests.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by AGString on 2019. 11. 3.. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | // MARK: - AppDelegate 12 | 13 | /// The AppDelegate 14 | @UIApplicationMain 15 | class AppDelegate: UIResponder, UIApplicationDelegate { 16 | 17 | /// The UIWindow 18 | var window: UIWindow? 19 | 20 | /// The RootViewController 21 | var rootViewController: UIViewController { 22 | return UIViewController() 23 | } 24 | 25 | /// Application did finish launching with options 26 | /// 27 | /// - Parameters: 28 | /// - application: The UIApplication 29 | /// - launchOptions: The LaunchOptions 30 | /// - Returns: The launch result 31 | func application(_ application: UIApplication, 32 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 33 | // Initialize UIWindow 34 | self.window = .init(frame: UIScreen.main.bounds) 35 | // Set RootViewController 36 | self.window?.rootViewController = self.rootViewController 37 | // Make Key and Visible 38 | self.window?.makeKeyAndVisible() 39 | // Return positive launch 40 | return true 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "idiom" : "ios-marketing", 113 | "size" : "1024x1024", 114 | "scale" : "1x" 115 | } 116 | ], 117 | "info" : { 118 | "version" : 1, 119 | "author" : "xcode" 120 | } 121 | } -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Example/Resources/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Example/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Resources/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Example/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | AGString 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 AGString 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.0 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "AGString", 7 | platforms: [ 8 | .iOS(.v8), 9 | .tvOS(.v9), 10 | .watchOS(.v2), 11 | .macOS(.v10_10) 12 | ], 13 | products: [ 14 | .library( 15 | name: "AGString", 16 | targets: ["AGString"] 17 | ), 18 | ], 19 | dependencies: [], 20 | targets: [ 21 | .target( 22 | name: "AGString", 23 | dependencies: [], 24 | path: "Sources" 25 | ), 26 | .testTarget( 27 | name: "AGStringTests", 28 | dependencies: ["AGString"], 29 | path: "Tests" 30 | ), 31 | ] 32 | ) 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | AGString Logo

3 |

4 | 5 | Swift 5.0 6 | 7 | 8 | Version 9 | 10 | 11 | Platform 12 | 13 | 14 | Carthage Compatible 15 | 16 | 17 | SPM 18 | 19 |

20 | 21 |

22 | 23 | SPM 24 | 25 | SPM 26 | 27 | 28 | SonarSwift 29 | 30 |

31 | 32 | # AGString 33 |

34 | AGString is an extension for convenient working with swift String. 35 |

36 |

37 | AGRegex is Wrapper of NSRegularExpression. It gives an easy and iterative way to use RegularExpression. 38 |

39 | 40 | ## Features 41 | - AGString gives 'String type' to 'Int-Index' based referencing 42 | 43 | * :white_check_mark: Get Character object with Int index 44 | * :white_check_mark: Get substring object with Range 45 | * :white_check_mark: String utility methods(zfill, countOccurence, ltrim,rtrim ...) 46 | 47 | - AGRegex 48 | 49 | * :white_check_mark: Provide NSRange extension for String 50 | * :white_check_mark: Get All Match Result as AGMatch structure. 51 | * :white_check_mark: Support iterative way to use match result 52 | * :white_check_mark: Substitute matched string to other string 53 | 54 | ## Example 55 | The example application is the best way to see `AGString` in action. Simply open the `AGString.xcodeproj` and run the `Example` scheme. 56 | ## Installation 57 | ### CocoaPods 58 | AGString is available through [CocoaPods](http://cocoapods.org). To install 59 | it, simply add the following line to your Podfile: 60 | ```bash 61 | pod 'AGString' 62 | ``` 63 | ### Carthage 64 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. 65 | To integrate AGString into your Xcode project using Carthage, specify it in your `Cartfile`: 66 | ```ogdl 67 | github "SwiftAlgorithmClub/AGString" 68 | ``` 69 | Run `carthage update` to build the framework and drag the built `AGString.framework` into your Xcode project. 70 | On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase” and add the Framework path as mentioned in [Carthage Getting started Step 4, 5 and 6](https://github.com/Carthage/Carthage/blob/master/README.md#if-youre-building-for-ios-tvos-or-watchos) 71 | ## AGString Usage 72 | ### Slicing 73 | ```swift 74 | var str = "Hello, World!" 75 | str[1..<3] // "el" 76 | str[7...9] // "Wor" 77 | str[7...] // "World!" 78 | str[..<5] // "Hello" 79 | str[...5] // "Hello," 80 | ``` 81 | ### CharAt 82 | ```swift 83 | var str = "Hello, World!" 84 | str[1] // "e" 85 | ``` 86 | ### Trim 87 | ```swift 88 | " abcd ".trimLeft() 89 | // "abcd " 90 | " abcd ".trimRight() 91 | // " abcd" 92 | " abcd ".trim() 93 | //"abcd" 94 | ``` 95 | ### WordCount 96 | ```swift 97 | let str = "like in like" 98 | str.occurence(of: "like") // 2 99 | ``` 100 | ### Zfill 101 | ```swift 102 | let str = "abc" 103 | str.zfill(10) // "0000000abc" 104 | str.zfill(10, with: "1", direction: .right) // "abc1111111" 105 | ``` 106 | ## AGRegex Usage 107 | ### FindAll 108 | ```swift 109 | let r = try! NSRegularExpression(pattern: "ai", options: []) 110 | let regex = AGRegex(r) 111 | regex.findAll("The rain in Spain") 112 | /* 113 | [ 114 | AGMatch(start: 5, end: 7, base: str, groups: ["ai"]), 115 | AGMatch(start: 14, end: 16, base: str, groups: ["ai"]), 116 | ] 117 | */ 118 | ``` 119 | ### First 120 | ```swift 121 | let r = try! NSRegularExpression(pattern: "ai", options: []) 122 | let regex = AGRegex(r) 123 | regex.first("The rain in Spain") 124 | // AGMatch(start: 5, end: 7, base: str, groups: ["ai"]) 125 | ``` 126 | ### Last 127 | ```swift 128 | let r = try! NSRegularExpression(pattern: "ai", options: []) 129 | let regex = AGRegex(r) 130 | regex.last("The rain in Spain") 131 | // AGMatch(start: 14, end: 16, base: str, groups: ["ai"]) 132 | ``` 133 | ### Sub 134 | ```swift 135 | let r = try! NSRegularExpression(pattern: "ai", options: []) 136 | let regex = AGRegex(r) 137 | regex.last("The rain in Spain") 138 | // AGMatch(start: 14, end: 16, base: str, groups: ["ai"]) 139 | let r = try! NSRegularExpression(pattern: "\\s", options: []) 140 | let regex = AGRegex(r) 141 | regex.sub(str: "The rain in Spain", replace: "9") 142 | // The9rain9in9Spain 143 | regex.sub(str: str, replace: "9", count: 2) 144 | subWithCount == "The9rain9in Spain" 145 | // "The9rain9in Spain" 146 | ``` 147 | ### FindIter 148 | ```swift 149 | let r = try! NSRegularExpression(pattern: "([A-Z]+)([0-9]+)", options: []) 150 | let regex = AGRegex(r) 151 | for m in regex.finditer("ABC12DEF3G56HIJ7") { 152 | print("\(m.group(2)) * \(m.group(1))") 153 | } 154 | /* 155 | "12 * ABC", 156 | "3 * DEF", 157 | "56 * G", 158 | "7 * HIJ" 159 | */ 160 | ``` 161 | ## Contributing 162 | Contributions are very welcome 🙌 163 | ## License 164 | AGString is released under the MIT license. See LICENSE for details. 165 | -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Resources/AppIcon/android/playstore-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/android/playstore-icon.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-27x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-27x20@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-27x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-27x20@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-27x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-27x20@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-iPadAir-67x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-iPadAir-67x50@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-iPadAir-74x55@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-iPadAir-74x55@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-iPhone-60x45@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-app-store-1024x768.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-app-store-1024x768.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-transcript-32x24@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-transcript-32x24@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-transcript-32x24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-transcript-32x24@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/imessenger/icon-messages-transcript-32x24@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/imessenger/icon-messages-transcript-32x24@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images":[ 3 | { 4 | "idiom":"iphone", 5 | "size":"20x20", 6 | "scale":"2x", 7 | "filename":"Icon-App-20x20@2x.png" 8 | }, 9 | { 10 | "idiom":"iphone", 11 | "size":"20x20", 12 | "scale":"3x", 13 | "filename":"Icon-App-20x20@3x.png" 14 | }, 15 | { 16 | "idiom":"iphone", 17 | "size":"29x29", 18 | "scale":"1x", 19 | "filename":"Icon-App-29x29@1x.png" 20 | }, 21 | { 22 | "idiom":"iphone", 23 | "size":"29x29", 24 | "scale":"2x", 25 | "filename":"Icon-App-29x29@2x.png" 26 | }, 27 | { 28 | "idiom":"iphone", 29 | "size":"29x29", 30 | "scale":"3x", 31 | "filename":"Icon-App-29x29@3x.png" 32 | }, 33 | { 34 | "idiom":"iphone", 35 | "size":"40x40", 36 | "scale":"2x", 37 | "filename":"Icon-App-40x40@2x.png" 38 | }, 39 | { 40 | "idiom":"iphone", 41 | "size":"40x40", 42 | "scale":"3x", 43 | "filename":"Icon-App-40x40@3x.png" 44 | }, 45 | { 46 | "idiom":"iphone", 47 | "size":"60x60", 48 | "scale":"2x", 49 | "filename":"Icon-App-60x60@2x.png" 50 | }, 51 | { 52 | "idiom":"iphone", 53 | "size":"60x60", 54 | "scale":"3x", 55 | "filename":"Icon-App-60x60@3x.png" 56 | }, 57 | { 58 | "idiom":"iphone", 59 | "size":"76x76", 60 | "scale":"2x", 61 | "filename":"Icon-App-76x76@2x.png" 62 | }, 63 | { 64 | "idiom":"ipad", 65 | "size":"20x20", 66 | "scale":"1x", 67 | "filename":"Icon-App-20x20@1x.png" 68 | }, 69 | { 70 | "idiom":"ipad", 71 | "size":"20x20", 72 | "scale":"2x", 73 | "filename":"Icon-App-20x20@2x.png" 74 | }, 75 | { 76 | "idiom":"ipad", 77 | "size":"29x29", 78 | "scale":"1x", 79 | "filename":"Icon-App-29x29@1x.png" 80 | }, 81 | { 82 | "idiom":"ipad", 83 | "size":"29x29", 84 | "scale":"2x", 85 | "filename":"Icon-App-29x29@2x.png" 86 | }, 87 | { 88 | "idiom":"ipad", 89 | "size":"40x40", 90 | "scale":"1x", 91 | "filename":"Icon-App-40x40@1x.png" 92 | }, 93 | { 94 | "idiom":"ipad", 95 | "size":"40x40", 96 | "scale":"2x", 97 | "filename":"Icon-App-40x40@2x.png" 98 | }, 99 | { 100 | "idiom":"ipad", 101 | "size":"76x76", 102 | "scale":"1x", 103 | "filename":"Icon-App-76x76@1x.png" 104 | }, 105 | { 106 | "idiom":"ipad", 107 | "size":"76x76", 108 | "scale":"2x", 109 | "filename":"Icon-App-76x76@2x.png" 110 | }, 111 | { 112 | "idiom":"ipad", 113 | "size":"83.5x83.5", 114 | "scale":"2x", 115 | "filename":"Icon-App-83.5x83.5@2x.png" 116 | }, 117 | { 118 | "size" : "1024x1024", 119 | "idiom" : "ios-marketing", 120 | "scale" : "1x", 121 | "filename" : "ItunesArtwork@2x.png" 122 | } 123 | ], 124 | "info":{ 125 | "version":1, 126 | "author":"makeappicon" 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/AppIcon.appiconset/ItunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/AppIcon.appiconset/ItunesArtwork@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/README.md: -------------------------------------------------------------------------------- 1 | ## iTunesArtwork & iTunesArtwork@2x (App Icon) file extension: 2 | 3 | PNG extension is prepended to these two files - 4 | 5 | While Apple suggested to omit the extension for these files, 6 | the '.png' extension is actually required for iTunesConnect submission. 7 | 8 | This is done for you so you don't have to. 9 | 10 | However, for Ad_hoc or Enterprise distirbution, the extension should be removed 11 | from the files before adding to XCode to avoid error. 12 | 13 | refs: https://developer.apple.com/library/ios/qa/qa1686/_index.html 14 | 15 | ## iTunesArtwork & iTunesArtwork@2x (App Icon) transparency handling: 16 | 17 | As images with alpha channels or transparencies cannot be set as an application's icon on 18 | iTunesConnect, all transparent pixels in your images will be converted into 19 | solid blacks. 20 | 21 | To achieve the best result, you're advised to adjust the transparency settings 22 | in your source files before converting them with makeAppIcon. 23 | 24 | refs: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/AppIcons.html 25 | -------------------------------------------------------------------------------- /Resources/AppIcon/ios/iTunesArtwork@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/iTunesArtwork@1x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/ios/iTunesArtwork@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/ios/iTunesArtwork@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images":[ 3 | { 4 | "size":"24x24", 5 | "idiom":"watch", 6 | "scale":"2x", 7 | "filename":"Icon-24@2x.png", 8 | "role":"notificationCenter", 9 | "subtype":"38mm" 10 | }, 11 | { 12 | "size":"27.5x27.5", 13 | "idiom":"watch", 14 | "scale":"2x", 15 | "filename":"Icon-27.5@2x.png", 16 | "role":"notificationCenter", 17 | "subtype":"42mm" 18 | }, 19 | { 20 | "size":"29x29", 21 | "idiom":"watch", 22 | "scale":"2x", 23 | "filename":"Icon-29@2x.png", 24 | "role":"companionSettings" 25 | }, 26 | { 27 | "size":"29x29", 28 | "idiom":"watch", 29 | "scale":"3x", 30 | "filename":"Icon-29@3x.png", 31 | "role":"companionSettings" 32 | }, 33 | { 34 | "size":"40x40", 35 | "idiom":"watch", 36 | "scale":"2x", 37 | "filename":"Icon-40@2x.png", 38 | "role":"appLauncher", 39 | "subtype":"38mm" 40 | }, 41 | { 42 | "size":"44x44", 43 | "idiom":"watch", 44 | "scale":"2x", 45 | "filename":"Icon-44@2x.png", 46 | "role":"longLook", 47 | "subtype":"42mm" 48 | }, 49 | { 50 | "size":"86x86", 51 | "idiom":"watch", 52 | "scale":"2x", 53 | "filename":"Icon-86@2x.png", 54 | "role":"quickLook", 55 | "subtype":"38mm" 56 | }, 57 | { 58 | "size":"98x98", 59 | "idiom":"watch", 60 | "scale":"2x", 61 | "filename":"Icon-98@2x.png", 62 | "role":"quickLook", 63 | "subtype":"42mm" 64 | } 65 | ], 66 | "info":{ 67 | "version":1, 68 | "author":"makeappicon" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-24@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-24@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-27.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-27.5@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-44@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-44@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-86@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-86@2x.png -------------------------------------------------------------------------------- /Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-98@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/Resources/AppIcon/watchkit/AppIcon.appiconset/Icon-98@2x.png -------------------------------------------------------------------------------- /Sources/Regex/AGMatch.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGMatch.swift 3 | // AGString-iOS 4 | // 5 | // Created by tskim on 2019/11/04. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public typealias AGSpan = NSRange 12 | 13 | public struct AGMatch: Equatable { 14 | let start: Int 15 | let end: Int 16 | private let groups: [String] 17 | 18 | public init(start: Int, end: Int, base: String, groups: [String]) { 19 | self.start = start 20 | self.end = end 21 | self.groups = groups 22 | } 23 | } 24 | 25 | extension AGMatch { 26 | public var groupCount: Int { 27 | return groups.count 28 | } 29 | 30 | public func group(_ index: Int = 0) -> String { 31 | guard index < groups.count else { 32 | return "" 33 | } 34 | 35 | return groups[index] 36 | } 37 | 38 | public var span: AGSpan { 39 | return NSRange(location: start, length: start + end) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Sources/Regex/AGMatchLazyList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGMatchLazyList.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/11. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct AGMatchLazyList: Equatable, Sequence { 12 | public typealias Iterator = AGMatchLazyListIterator 13 | public typealias Element = AGMatch 14 | 15 | public let baseString: String 16 | private let regex: NSRegularExpression 17 | 18 | init(base: String, regex: NSRegularExpression) { 19 | self.baseString = base 20 | self.regex = regex 21 | } 22 | 23 | public __consuming func makeIterator() -> AGMatchLazyList.Iterator { 24 | return AGMatchLazyListIterator(base: baseString, 25 | regex: self.regex) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Sources/Regex/AGMatchLazyListIterator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGMatchLazyListIterator.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/11. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct AGMatchLazyListIterator: IteratorProtocol { 12 | public typealias Element = AGMatch 13 | 14 | private let baseString: String 15 | private let regex: NSRegularExpression 16 | private var offset: Int = 0 17 | 18 | public mutating func next() -> AGMatch? { 19 | guard let matched = regex.firstMatch( 20 | in: baseString, 21 | options: [], 22 | range: NSRange(location: offset, length: baseString.count - offset)) 23 | else { return nil } 24 | 25 | var group: [String] = [] 26 | 27 | for index in 0 ..< matched.numberOfRanges { 28 | let interpolated = NSRange( 29 | location: matched.range(at: index).lowerBound, 30 | length: matched.range(at: index).length) 31 | 32 | group.append(baseString[interpolated]) 33 | } 34 | 35 | let result = AGMatch( 36 | start: matched.range.lowerBound, 37 | end: matched.range.upperBound, 38 | base: baseString, 39 | groups: group) 40 | 41 | self.offset = matched.range.upperBound 42 | 43 | return result 44 | } 45 | 46 | init(base: String, regex: NSRegularExpression) { 47 | self.baseString = base 48 | self.regex = regex 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Sources/Regex/AGMatchList.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGMatchList.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/10. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct AGMatchList: Equatable, Sequence { 12 | public typealias Iterator = AGMatchListIterator 13 | public typealias Element = AGMatch 14 | 15 | public let baseString: String 16 | private let list: [Element] 17 | 18 | init(base: String, matching matchList: [Element]) { 19 | baseString = base 20 | list = matchList 21 | } 22 | 23 | public var first: AGMatch? { 24 | return list.first 25 | } 26 | 27 | public var last: AGMatch? { 28 | return list.last 29 | } 30 | 31 | public __consuming func makeIterator() -> AGMatchList.Iterator { 32 | return AGMatchListIterator(list.makeIterator()) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Sources/Regex/AGMatchListIterator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGMatchIterator.swift 3 | // AGString-iOS 4 | // 5 | // Created by tskim on 2019/11/04. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public struct AGMatchListIterator: IteratorProtocol { 12 | public typealias Element = AGMatch 13 | 14 | var iterator: IndexingIterator<[AGMatch]> 15 | public mutating func next() -> AGMatch? { 16 | return iterator.next() 17 | } 18 | 19 | init(_ iterator: IndexingIterator<[AGMatch]>) { 20 | self.iterator = iterator 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Sources/Regex/AGRegex.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGRegex.swift 3 | // AGString-iOS 4 | // 5 | // Created by tskim on 2019/11/03. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | @_exported import Foundation 10 | 11 | public class AGRegex { 12 | 13 | private var regex: NSRegularExpression 14 | 15 | public init(_ regex: NSRegularExpression) { 16 | self.regex = regex 17 | } 18 | } 19 | 20 | extension AGRegex { 21 | 22 | public func makeMatchList(_ str: String, 23 | options: NSRegularExpression.MatchingOptions = []) 24 | -> AGMatchList { 25 | let matched = regex.matches( 26 | in: str, 27 | options: options, 28 | range: NSRange(location: 0, length: str.count)) 29 | let mapped: [AGMatch] = matched.map { 30 | var group: [String] = [] 31 | 32 | for index in 0 ..< $0.numberOfRanges { 33 | group.append(str[$0.range(at: index)]) 34 | } 35 | 36 | return AGMatch(start: $0.range.lowerBound, 37 | end: $0.range.upperBound, 38 | base: str, 39 | groups: group) 40 | } 41 | 42 | return AGMatchList(base: str, matching: mapped) 43 | } 44 | 45 | public func sub(str: String, replace: String, count: Int = Int.max) -> String { 46 | var result = str 47 | var replacingCount = count 48 | 49 | while replacingCount > 0, let matched = regex.firstMatch( 50 | in: result, 51 | options: [], 52 | range: NSRange(location: 0, length: result.count)) { 53 | result.replaceSubrange( 54 | result.range(with: matched.range), 55 | with: replace) 56 | replacingCount -= 1 57 | } 58 | 59 | return result 60 | } 61 | 62 | public func makeMatchStream(_ str: String, 63 | option: NSRegularExpression.MatchingOptions = []) 64 | -> AGMatchLazyList { 65 | return AGMatchLazyList(base: str, regex: self.regex) 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Sources/Regex/String+NSRange.swift: -------------------------------------------------------------------------------- 1 | // 2 | // String+NSRange.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/06. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | public func range(with range: NSRange) -> Range { 13 | let begin = index(startIndex, offsetBy: range.location) 14 | let end = index(startIndex, offsetBy: range.location + range.length) 15 | return begin.. String { 19 | return String(self[self.range(with: range)]) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Sources/String/AGString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGString.swift 3 | // AGString 4 | // 5 | // Created by AGString on 2019. 11. 3.. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | // Include Foundation 10 | @_exported import Foundation 11 | -------------------------------------------------------------------------------- /Sources/String/StringIndex.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StringIndex.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/03. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | extension String { 12 | public subscript(index: Int) -> Character { 13 | set { 14 | let begin = self.index(startIndex, offsetBy: index) 15 | let end = self.index(begin, offsetBy: 1) 16 | self.replaceSubrange(begin ..< end, with: [newValue]) 17 | } 18 | get { 19 | return self[self.index(self.startIndex, offsetBy: index)] 20 | } 21 | } 22 | 23 | public subscript(bounds: CountableRange) -> String { 24 | set { 25 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 26 | let end = index(startIndex, offsetBy: bounds.upperBound) 27 | 28 | self.replaceSubrange(begin ..< end, with: newValue) 29 | } 30 | get { 31 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 32 | let end = index(startIndex, offsetBy: bounds.upperBound) 33 | 34 | return String(self[begin ..< end]) 35 | } 36 | } 37 | 38 | public subscript(bounds: CountableClosedRange) -> String { 39 | set { 40 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 41 | let end = index(startIndex, offsetBy: bounds.upperBound) 42 | 43 | self.replaceSubrange(begin ... end, with: newValue) 44 | } 45 | get { 46 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 47 | let end = index(startIndex, offsetBy: bounds.upperBound) 48 | 49 | return String(self[begin ... end]) 50 | } 51 | } 52 | 53 | public subscript(bounds: CountablePartialRangeFrom) -> String { 54 | set { 55 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 56 | 57 | self.replaceSubrange(begin ..< endIndex, with: newValue) 58 | } 59 | get { 60 | let begin = index(startIndex, offsetBy: bounds.lowerBound) 61 | 62 | return String(self[begin ..< endIndex]) 63 | } 64 | } 65 | 66 | public subscript(bounds: PartialRangeThrough) -> String { 67 | set { 68 | let end = index(startIndex, offsetBy: bounds.upperBound) 69 | 70 | self.replaceSubrange(startIndex ... end, with: newValue) 71 | } 72 | get { 73 | let end = index(startIndex, offsetBy: bounds.upperBound) 74 | 75 | return String(self[startIndex ... end]) 76 | } 77 | } 78 | 79 | public subscript(bounds: PartialRangeUpTo) -> String { 80 | set { 81 | let end = index(startIndex, offsetBy: bounds.upperBound) 82 | 83 | self.replaceSubrange(startIndex ..< end, with: newValue) 84 | } 85 | get { 86 | let end = index(startIndex, offsetBy: bounds.upperBound) 87 | 88 | return String(self[startIndex ..< end]) 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Sources/String/Utility.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Utility.swift 3 | // AGString-iOS 4 | // 5 | // Created by 조수환 on 2019/11/03. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // MARK: - ZFill 12 | extension String { 13 | public enum ZFillDirection { 14 | case left 15 | case right 16 | } 17 | public func zfill(_ length: Int, with character: Character = "0", direction dir: ZFillDirection = .left) -> String { 18 | let lengthToNeed = length - self.count 19 | 20 | if lengthToNeed <= 0 { 21 | return self 22 | } else { 23 | 24 | let str = String(repeating: character, count: lengthToNeed) 25 | switch dir { 26 | case .left: 27 | return str + self 28 | case .right: 29 | return self + str 30 | } 31 | } 32 | } 33 | 34 | } 35 | 36 | // MARK: - occurence counting 37 | extension String { 38 | 39 | public func occurence(of str: String) -> Int { 40 | let length = self.count 41 | let strLength = str.count 42 | 43 | var result = 0 44 | 45 | // partial[i] = N의 길이가 i인 접두사의 접두사도 되고 접미사도 되는 문자열의 최대 길이 46 | let partial: [Int] = str.partial() 47 | 48 | var begin = 0 49 | var matched = 0 50 | 51 | while begin <= length - strLength { 52 | let hIndex = self.index(self.startIndex, offsetBy: begin+matched) 53 | let nIndex = str.index(self.startIndex, offsetBy: matched) 54 | 55 | if matched < strLength, self[hIndex] == str[nIndex] { 56 | matched += 1 57 | 58 | if matched == strLength { 59 | result += 1 60 | } 61 | } else { 62 | if matched == 0 { 63 | begin += 1 64 | } else { 65 | begin += (matched - partial[matched - 1]) 66 | 67 | matched = partial[matched - 1] 68 | } 69 | } 70 | } 71 | 72 | return result 73 | } 74 | 75 | fileprivate func partial() -> [Int] { 76 | let length = self.count 77 | var result = Array(repeating: 0, count: length) 78 | 79 | var begin = 1 80 | var matched = 0 81 | 82 | while begin + matched < length { 83 | let postfixIndex = self.index(startIndex, offsetBy: begin + matched) 84 | let prefixIndex = self.index(startIndex, offsetBy: matched) 85 | 86 | if self[prefixIndex] == self[postfixIndex] { 87 | matched += 1 88 | result[begin + matched - 1] = matched 89 | } else { 90 | if matched == 0 { 91 | begin += 1 92 | } else { 93 | begin += matched - result[matched - 1] 94 | matched = result[matched - 1] 95 | } 96 | } 97 | } 98 | 99 | return result 100 | } 101 | } 102 | 103 | // MARK: - trimming(left,right,both) 104 | extension String { 105 | public func trimLeft() -> String { 106 | if self.isEmpty { 107 | return "" 108 | } 109 | 110 | var cursor = 0 111 | 112 | while cursor < self.count, self[cursor].isWhitespace { 113 | cursor += 1 114 | } 115 | 116 | if cursor == self.count { 117 | return "" 118 | } else { 119 | return self[cursor...] 120 | } 121 | } 122 | 123 | public func trimRight() -> String { 124 | if self.isEmpty { 125 | return "" 126 | } 127 | 128 | var cursor = self.count-1 129 | 130 | while cursor >= 0, self[cursor].isWhitespace { 131 | cursor -= 1 132 | } 133 | 134 | if cursor < 0 { 135 | return "" 136 | } else { 137 | return self[...cursor] 138 | } 139 | } 140 | 141 | public func trim() -> String { 142 | return self.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 143 | } 144 | } 145 | 146 | // MARK: - Slicing using characters 147 | 148 | extension String { 149 | 150 | /// Returns a sliced string of given string 151 | /// from the first `start` character to the last `end` character. 152 | /// 153 | /// If the lower bound is greater than the upper bound, it returns an empty string. 154 | /// If the given string doesn't contain given characters, it also returns an empty string. 155 | /// 156 | /// - Parameters: 157 | /// - start: The character value being the lower bound of the given string. 158 | /// - end: The character value being the upper bound of the given string. 159 | /// - inversed: A boolean value that indicates whether the sliced string is inversed. 160 | /// The Default value is `false`. 161 | /// 162 | /// - Returns: A sliced string of given string. 163 | public func sliced(from start: Character, to end: Character, inversed: Bool = false) -> String { 164 | guard let startCharacterIndex = firstIndex(of: start), 165 | let endCharacterIndex = lastIndex(of: end), 166 | startCharacterIndex <= endCharacterIndex 167 | else { return "" } 168 | let slicedSubstring = self[startCharacterIndex ... endCharacterIndex] 169 | return !inversed ? String(slicedSubstring) : String(slicedSubstring.reversed()) 170 | } 171 | 172 | /// Slices a given string 173 | /// from the first `start` character to the last `end` character. 174 | /// 175 | /// If the lower bound is greater than the upper bound, it becomes an empty string. 176 | /// If the given string doesn't contain given characters, it also becomes an emtpy string. 177 | /// 178 | /// - Parameters: 179 | /// - start: The character value being the lower bound of the given string. 180 | /// - end: The character value being the upper bound of the given string. 181 | /// - inversed: A boolean value that indicates whether the sliced string is inversed. 182 | /// The Default value is `false`. 183 | public mutating func slice(from start: Character, to end: Character, inversed: Bool = false) { 184 | guard let startCharacterIndex = firstIndex(of: start), 185 | let endCharacterIndex = lastIndex(of: end), 186 | startCharacterIndex <= endCharacterIndex else { 187 | self = "" 188 | return 189 | } 190 | let slicedSubstring = self[startCharacterIndex ... endCharacterIndex] 191 | self = !inversed ? String(slicedSubstring) : String(slicedSubstring.reversed()) 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /Tests/AGRegexTest.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGRegexTest.swift 3 | // AGString-iOS 4 | // 5 | // Created by tskim on 2019/11/04. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | 10 | @testable import AGString 11 | import XCTest 12 | 13 | class AGRegexTest: XCTestCase { 14 | 15 | func testFindAll() { 16 | let r = try! NSRegularExpression(pattern: "ai", options: []) 17 | let regex = AGRegex(r) 18 | let str = "The rain in Spain" 19 | let actual = regex.makeMatchList(str) 20 | let expect = AGMatchList(base: str, matching: [ 21 | AGMatch(start: 5, end: 7, base: str, groups: ["ai"]), 22 | AGMatch(start: 14, end: 16, base: str, groups: ["ai"]), 23 | ]) 24 | 25 | XCTAssertEqual(actual, expect) 26 | } 27 | 28 | func testFirstMatch() { 29 | let r = try! NSRegularExpression(pattern: "ai", options: []) 30 | let regex = AGRegex(r) 31 | let str = "The rain in Spain" 32 | let actual = regex.makeMatchList(str).first 33 | let expect = AGMatch(start: 5, end: 7, base: str, groups: ["ai"]) 34 | XCTAssertEqual(actual, expect) 35 | } 36 | 37 | func testLastMatch() { 38 | let r = try! NSRegularExpression(pattern: "ai", options: []) 39 | let regex = AGRegex(r) 40 | let str = "The rain in Spain" 41 | let actual = regex.makeMatchList(str).last 42 | let expect = AGMatch(start: 14, end: 16, base: str, groups: ["ai"]) 43 | XCTAssertEqual(actual, expect) 44 | } 45 | 46 | func testSub() { 47 | let r = try! NSRegularExpression(pattern: "\\s", options: []) 48 | let regex = AGRegex(r) 49 | let str = "The rain in Spain" 50 | let actual = regex.sub(str: str, replace: "9") 51 | let expect = "The9rain9in9Spain" 52 | XCTAssertEqual(actual, expect) 53 | } 54 | 55 | func testSubWithCount() { 56 | let r = try! NSRegularExpression(pattern: "\\s", options: []) 57 | let regex = AGRegex(r) 58 | let str = "The rain in Spain" 59 | let actual = regex.sub(str: str, replace: "9", count: 2) 60 | let expect = "The9rain9in Spain" 61 | XCTAssertEqual(actual, expect) 62 | } 63 | 64 | func testLazyMatch() { 65 | let r = try! NSRegularExpression(pattern: "([A-Z]+)([0-9]+)", options: []) 66 | let regex = AGRegex(r) 67 | let str = "ABC12DEF3G56HIJ7" 68 | 69 | 70 | let expects = [ 71 | "12 * ABC", 72 | "3 * DEF", 73 | "56 * G", 74 | "7 * HIJ" 75 | ] 76 | 77 | var actuals: [String] = [] 78 | 79 | for m in regex.makeMatchStream(str) { 80 | let actual = "\(m.group(2)) * \(m.group(1))" 81 | actuals.append(actual) 82 | } 83 | 84 | XCTAssertEqual(actuals, expects) 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Tests/AGStringTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AGStringTests.swift 3 | // AGStringTests 4 | // 5 | // Created by AGString on 2019. 11. 3.. 6 | // Copyright © 2019 AGString. All rights reserved. 7 | // 8 | 9 | @testable import AGString 10 | import XCTest 11 | 12 | class AGStringTests: XCTestCase { 13 | 14 | static var allTests = [ 15 | ("testExample", testExample), 16 | ] 17 | 18 | func testExample() { 19 | var str = "Hello, World!" 20 | 21 | XCTAssert(str[1] == "e") 22 | XCTAssert(str[1..<3] == "el") 23 | XCTAssert(str[7...9] == "Wor") 24 | XCTAssert(str[7...] == "World!") 25 | XCTAssert(str[..<5] == "Hello") 26 | XCTAssert(str[...5] == "Hello,") 27 | 28 | str[1] = "a" 29 | XCTAssert(str == "Hallo, World!") 30 | 31 | str[1..<6] = "uge" 32 | XCTAssert(str == "Huge World!") 33 | 34 | str[5...7] = "Go" 35 | XCTAssert(str == "Huge Gold!") 36 | 37 | str[9...] = "!!!" 38 | XCTAssert(str == "Huge Gold!!!") 39 | 40 | str[..<4] = "Good" 41 | XCTAssert(str == "Good Gold!!!") 42 | 43 | str[...3] = "Goodbye" 44 | XCTAssert(str == "Goodbye Gold!!!") 45 | } 46 | 47 | func testZfill() { 48 | let str = "abc" 49 | 50 | let str2 = str.zfill(2) 51 | XCTAssert(str2 == "abc") 52 | 53 | let str3 = str.zfill(3) 54 | XCTAssert(str3 == "abc") 55 | 56 | let str4 = str.zfill(10) 57 | XCTAssert(str4 == "0000000abc") 58 | 59 | let str5 = str.zfill(10, with: "x") 60 | XCTAssert(str5 == "xxxxxxxabc") 61 | } 62 | 63 | func testOccurence() { 64 | let str = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 65 | 66 | XCTAssert(str.occurence(of: " ") == 68) 67 | 68 | let str2 = String(repeating: "a", count: 1000) 69 | measure { 70 | str2.occurence(of: "a") 71 | } 72 | } 73 | 74 | func testLtrim() { 75 | 76 | XCTAssert(" abcd ".trimLeft() == "abcd ") 77 | XCTAssert(" abcd".trimLeft() == "abcd") 78 | XCTAssert("".trimLeft() == "") 79 | XCTAssert("abcd ".trimLeft() == "abcd ") 80 | XCTAssert("Hello, World!".trimLeft() == "Hello, World!") 81 | let str = " a" 82 | measure { 83 | str.trimLeft() 84 | } 85 | } 86 | 87 | func testRtrim() { 88 | 89 | XCTAssert(" abcd ".trimRight() == " abcd") 90 | XCTAssert(" abcd".trimRight() == " abcd") 91 | XCTAssert("".trimRight() == "") 92 | XCTAssert("abcd ".trimRight() == "abcd") 93 | XCTAssert("Hello, World!".trimRight() == "Hello, World!") 94 | let str = "a " 95 | measure { 96 | str.trimRight() 97 | } 98 | } 99 | 100 | func testTrim() { 101 | XCTAssert(" abcd ".trim() == "abcd") 102 | XCTAssert(" abcd".trim() == "abcd") 103 | XCTAssert("".trim() == "") 104 | XCTAssert("abcd ".trim() == "abcd") 105 | XCTAssert("Hello, World!".trim() == "Hello, World!") 106 | let str = " a " 107 | measure { 108 | str.trim() 109 | } 110 | } 111 | 112 | func testSliced() { 113 | XCTAssertEqual("abcdef".sliced(from: "a", to: "d"), "abcd") 114 | XCTAssertEqual("abcdef".sliced(from: "a", to: "a"), "a") 115 | XCTAssertEqual("abcdef".sliced(from: "a", to: "d", inversed: true), "dcba") 116 | XCTAssertEqual("abcdef".sliced(from: "a", to: "a", inversed: true), "a") 117 | XCTAssertEqual("abcdef".sliced(from: "a", to: "g"), "") 118 | XCTAssertEqual("abcdef".sliced(from: "g", to: "g"), "") 119 | } 120 | 121 | func testSlice() { 122 | var string = "abcdef" 123 | string.slice(from: "a", to: "d") 124 | XCTAssertEqual(string, "abcd") 125 | string = "abcdef" 126 | string.slice(from: "a", to: "a") 127 | XCTAssertEqual(string, "a") 128 | string = "abcdef" 129 | string.slice(from: "a", to: "d", inversed: true) 130 | XCTAssertEqual(string, "dcba") 131 | string = "abcdef" 132 | string.slice(from: "a", to: "a", inversed: true) 133 | XCTAssertEqual(string, "a") 134 | string = "abcdef" 135 | string.slice(from: "a", to: "g") 136 | XCTAssertEqual(string, "") 137 | string = "abcdef" 138 | string.slice(from: "g", to: "g") 139 | XCTAssertEqual(string, "") 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import AGStringTests 3 | 4 | XCTMain([ 5 | testCase(AGStringTests.allTests), 6 | ]) 7 | -------------------------------------------------------------------------------- /deploy_rsa.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwiftAlgorithmClub/AGString/057f573898d60c95582f92418d4572d804a46a7e/deploy_rsa.enc -------------------------------------------------------------------------------- /fastlane/.env: -------------------------------------------------------------------------------- 1 | FASTLANE_SKIP_UPDATE_CHECK=1 -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | fastlane_version "2.120.0" 2 | 3 | default_platform :ios 4 | 5 | platform :ios do 6 | 7 | desc "Release a new version of AGString" 8 | lane :release do |options| 9 | # Ensure Git status is clean 10 | ensure_git_status_clean 11 | # Ensure Git branch is master 12 | ensure_git_branch(branch: 'master') 13 | # Perform Dependency-Manager compatibility tests 14 | compatibilityTests 15 | # Perform Tests 16 | tests 17 | # Retrieve Version from options 18 | version = options[:version] 19 | # Increment Version 20 | increment(version: version) 21 | # Add Git Tag 22 | add_git_tag(tag: version) 23 | # Push Git Tag 24 | push_git_tags() 25 | # Push Git commit 26 | push_to_git_remote() 27 | # Pod push / Pod trunk 28 | pod_push() 29 | end 30 | 31 | desc "Increment Version" 32 | lane :increment do |options| 33 | # Retrieve Version from options 34 | version = options[:version] 35 | # Set Podspec version 36 | version_bump_podspec( 37 | path: "AGString.podspec", 38 | version_number: version 39 | ) 40 | # Set Framework plist version 41 | set_info_plist_value( 42 | path: "Configs/AGString.plist", 43 | key: "CFBundleShortVersionString", 44 | value: version 45 | ) 46 | # Set Framework Tests plist version 47 | set_info_plist_value( 48 | path: "Configs/AGStringTests.plist", 49 | key: "CFBundleShortVersionString", 50 | value: version 51 | ) 52 | # Set Example plist version 53 | set_info_plist_value( 54 | path: "Example/Resources/Info.plist", 55 | key: "CFBundleShortVersionString", 56 | value: version 57 | ) 58 | # Commit modified files 59 | git_commit( 60 | path: [ 61 | "AGString.podspec", 62 | "Configs/AGString.plist", 63 | "Configs/AGStringTests.plist", 64 | "Example/Resources/Info.plist" 65 | ], 66 | message: "AGString Version #{version} 🚀" 67 | ) 68 | end 69 | 70 | desc "Runs tests" 71 | lane :tests do 72 | # Perform iOS Tests 73 | scan( 74 | project: "AGString.xcodeproj", 75 | scheme: "AGString-iOS", 76 | clean: true 77 | ) 78 | # Perform tvOS Tests 79 | scan( 80 | project: "AGString.xcodeproj", 81 | scheme: "AGString-tvOS", 82 | clean: true 83 | ) 84 | # Perform macOS Tests 85 | spm(command: "test") 86 | # Delete SPM build artifacts 87 | spm(command: "clean") 88 | end 89 | 90 | desc "Run Dependency-Manager compatibility tests" 91 | lane :compatibilityTests do 92 | # Carthage build to ensure Carthage compatibility 93 | carthage( 94 | command: "build", 95 | no_skip_current: true, 96 | cache_builds: true 97 | ) 98 | # Pod lib lint to ensure CocoaPods compatibility 99 | pod_lib_lint(allow_warnings: true) 100 | # SPM Build to ensure Swift Package Manager compatibility 101 | spm(command: "build") 102 | # Delete SPM build artifacts 103 | spm(command: "clean") 104 | end 105 | 106 | end 107 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=SwiftAlgorithmClub_AGString 2 | sonar.organization=swiftalgorithmclub 3 | 4 | # this is the name and version displayed in the SonarCloud UI. 5 | sonar.projectName=AGString 6 | sonar.projectVersion=1.0 7 | 8 | # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. 9 | # This property is optional if sonar.modules is set. 10 | sonar.sources=. 11 | 12 | sonar.exclusions=**/Test*.swift 13 | 14 | # Encoding of the source code. Default is default system encoding 15 | #sonar.sourceEncoding=UTF-8 16 | 17 | # The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper 18 | # and setting the property "sonar.cfamily.build-wrapper-output", but it was not specified. 19 | # If you don't want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties: 20 | sonar.c.file.suffixes=- 21 | sonar.cpp.file.suffixes=- 22 | sonar.objc.file.suffixes=- --------------------------------------------------------------------------------