zoukankan      html  css  js  c++  java
  • Objectivec 字符串比较的陷井 不及格的程序员

    (lldb) po [success compare:@"yes"] 

    $1 = 0 <nil>

    (lldb) p [success compare:@"yes"] 

    (int) $2 = 0

    (lldb) p [success isEqualToString:@"yes"]  安全写法

    (char) $3 = '\0'

    (lldb) p success 

    (NSString *) $4 = 0x00000000

    (lldb) p [success compare:@"yes"] == 0 //NSOrderedSame

    (bool) $5 = true

  • 相关阅读:
    python
    突然萌发关于 redis 的想法(1)
    Liunx
    Git
    说一下数据库查询 和 分页问题的解决
    易忘点
    python
    python
    python
    python
  • 原文地址:https://www.cnblogs.com/ioriwellings/p/2922541.html
Copyright © 2011-2022 走看看