New Line Command (\n) Not Working With Firebase Firestore Database Strings

后端 未结 6 1004
天涯浪人
天涯浪人 2020-12-06 01:36

I\'m making an app with Swift and I\'m using Firebase Firestore. Firestore is a database that has some strings that I put into a UILabel. With some of my stings

6条回答
  •  生来不讨喜
    2020-12-06 02:19

    For me firebase turned all \n to \\\\n , so I just reversed that change with :

    theString.replaceAll( "\\\\n", "\n" );
    

    Just posting cause I wasted some time calculating the right number of '\'

提交回复
热议问题