gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 19/30: tabbed button strings


From: gnunet
Subject: [taler-taler-ios] 19/30: tabbed button strings
Date: Sun, 19 Nov 2023 23:53:43 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 0df6b05f1b40650f12517d11636e669cc439d530
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sun Nov 19 13:29:40 2023 +0100

    tabbed button strings
---
 TalerWallet1/Helper/TalerStrings.swift | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/TalerWallet1/Helper/TalerStrings.swift 
b/TalerWallet1/Helper/TalerStrings.swift
index 117b5ee..fa1fcd2 100644
--- a/TalerWallet1/Helper/TalerStrings.swift
+++ b/TalerWallet1/Helper/TalerStrings.swift
@@ -40,6 +40,15 @@ extension StringProtocol {
 }
 
 extension String {
+    func tabbed(oneLine: Bool) -> String {
+        let fragments = self.components(separatedBy: "\t")
+        if fragments.count > 1 {
+            let separator = oneLine ? " " : "\n"
+            return fragments.joined(separator: separator)
+        }
+        return self
+    }
+
     func widthOfString(usingUIFont font: UIFont) -> CGFloat {
         let fontAttributes = [NSAttributedString.Key.font: font]
         let size = self.size(withAttributes: fontAttributes)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]