diff --git a/VDS/Components/Label/Attributes/LabelAttributeModel.swift b/VDS/Components/Label/Attributes/LabelAttributeModel.swift index 578a9e15..a147a954 100644 --- a/VDS/Components/Label/Attributes/LabelAttributeModel.swift +++ b/VDS/Components/Label/Attributes/LabelAttributeModel.swift @@ -39,6 +39,27 @@ public extension String { func isValid(range: NSRange) -> Bool { range.location >= 0 && range.length > 0 && range.location + range.length <= count } + + func index(from: Int) -> Index { + return self.index(startIndex, offsetBy: from) + } + + func substring(from: Int) -> String { + let fromIndex = index(from: from) + return String(self[fromIndex...]) + } + + func substring(to: Int) -> String { + let toIndex = index(from: to) + return String(self[..) -> String { + let startIndex = index(from: r.lowerBound) + let endIndex = index(from: r.upperBound) + return String(self[startIndex.. 0 { + let preText = text.substring(to: strikethroughLocation) + let postText = text.substring(from: strikethroughLocation) + accessibilityLabels.append(preText) + accessibilityLabels.append(strikethroughAccessibilityText) + accessibilityLabels.append(postText) + } else { + accessibilityLabels.append(text) + } + } + return accessibilityLabels.joined(separator: " ") + } + bold = false hideCurrency = false leadingText = nil diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 663f0f5b..ab4ddef2 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,5 +1,6 @@ 1.0.76 ---------------- +- CXTDT-630735 - PriceLockup - Accessibility - CXTDT-626164 - FootnoteGroup - Dark mode 1.0.75