nsstring

    2熱度

    1回答

    假設兩個字符串: String 1:「從前有個美麗的公主名叫白雪公主.. 」 String 2:‘當然,這是一個時間,一個美麗的公主,成爲一個......’ 什麼是找到最長的最好方式‘交集’(或所有可能的交叉點)在Swift中兩個字符串的字級別?在前一種情況下,它將是:「一個美麗的公主」。

    -2熱度

    1回答

    更新一個字符串(類型的NSString)對於實施例: 我有兩個視圖控制器,A和B,A具有 @Property(copy,nonatomic)NSString *test; 如果A推到B如何能A的更新測試,我已經看到一些關於Double **和point的答案,但我不知道。謝謝!

    0熱度

    1回答

    @implementation NSString (StringCategory) -(id)init{ self =[super init]; return self; } -(id)initWithInput1:(NSString*)input1 input2:(NSString*)input2{ input1 = [input1 stringByT

    0熱度

    2回答

    當我將大寫字符串應用於字符串我不希望上標被capitialised。有沒有解決方案或我需要手動執行? NSStirng *title = @"25th event annual"; title = [title capitalizedString] ; // Current output 25Th Event Annual // Needed output 25th Event An

    0熱度

    1回答

    在我的測試中,當我用NSString的stringWithFormat:@"%.2f"方法保留兩位小數。 [NSString stringWithFormat:@"%.2f", 9999.999]; 結果是: 10000.00 [NSString stringWithFormat:@"%.2f", 9999.99]; 結果是:9999.99 [NSString stringWithFormat:@

    1熱度

    2回答

    我想基於NSLocale將輸入爲NSString的數字轉換爲NSDecimalNumber。 例如 InputString => 110.50 Current Locale => en_FI Expected output => 110.50 Actual output => 110 InputString => 110.50 Current Locale => en_US Expe

    0熱度

    2回答

    我已經創建了一個下面的方法,我可以發送dateString,InputFormat & OutputFormat以及下面。 - (NSString *)InstanceAwesomeFormatterunformattedDate:(NSString*)unformattedDate inputFormat:(NSString*)inputFormat outPutFormat:(NSString

    0熱度

    3回答

    我在NSData中得到類似這樣的東西,我想將它打印爲NSString數據,所以我可以爲此獲得一些解決方案。 我的數據是 (< 30820605 308204ed a0030201 02021011 b5aff6d9 6c725e0d 33105e6c 6115a930 0d06092a 864886f7 0d01010b 05003044 310b3009 06035504 06130255 53

    1熱度

    1回答

    我正在從服務器獲取Lucas V\U00e1zquez字符串。它在UILabel中打印爲Lucas Vázqez。 但是原始字符串是Lucas Vázquez。我如何得到正確的字符串? 建議請!

    -1熱度

    2回答

    所以,我已經越來越在另一個字符串字符串實例的方法是使用這個String類的擴展: func indexOf(target: String) -> Int? { let range = (self as NSString).range(of: target) guard range.toRange() != nil else { return nil