This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Character { | |
/// A simple emoji is one scalar and presented to the user as an Emoji | |
var isSimpleEmoji: Bool { | |
return unicodeScalars.count == 1 && unicodeScalars.first?.properties.isEmojiPresentation ?? false | |
} | |
/// Checks if the scalars will be merged into and emoji | |
var isCombinedIntoEmoji: Bool { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct StripePaymentCardTextField: UIViewRepresentable { | |
@Binding var cardParams: STPPaymentMethodCardParams | |
@Binding var isValid: Bool | |
func makeUIView(context: Context) -> STPPaymentCardTextField { | |
let input = STPPaymentCardTextField() | |
input.borderWidth = 0 | |
input.delegate = context.coordinator | |
return input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lightOrDark(color) { | |
// Check the format of the color, HEX or RGB? | |
if (color.match(/^rgb/)) { | |
// If HEX --> store the red, green, blue values in separate variables | |
color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/); | |
r = color[1]; | |
g = color[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CDView.swift | |
// CD | |
// | |
// Created by Daniel Kuntz on 7/3/23. | |
// | |
import SwiftUI | |
struct ShapeWithHole: Shape { |