NSString+FBXMLSafeString.h 859 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <Foundation/Foundation.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface NSString (FBXMLSafeString)
  12. /**
  13. Method used to normalize a string before passing it to XML document
  14. @param replacement The string to be used as a replacement for invalid XML characters
  15. @return The string where all characters, which are not members of
  16. XML Character Range definition (http://www.w3.org/TR/2008/REC-xml-20081126/#charsets),
  17. are replaced
  18. */
  19. - (NSString *)fb_xmlSafeStringWithReplacement:(NSString *)replacement;
  20. @end
  21. NS_ASSUME_NONNULL_END