Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
CPPhoneNumber: Difference between revisions - iPhone Development Wiki

CPPhoneNumber: Difference between revisions

From iPhone Development Wiki
(CPPhoneNumber! Yay!)
 
m (Reference)
Line 1: Line 1:
[[CPPhoneNumber]] is a set of utility functions in {{fwlink|AppSupport}} for handling phone numbers
[[CPPhoneNumber]] is a set of utility functions in {{fwlink|AppSupport}} for handling phone numbers
== Normalizing ==
== Normalizing ==
{{Function signature|signature=char *CPPhoneNumberCopyNormalized(char *);|firmware=? –}}
{{Function signature|signature=char *CPPhoneNumberCopyNormalized(char *);|firmware=? –}}
CPPhoneNumberCopyNormalized returns an allocated buffer containing a normalized copy of a phone number. You are responsible for freeing it.
CPPhoneNumberCopyNormalized returns a normalized copy<ref name="tn">https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html</ref> of a phone number.
 
<source lang="c">
<source lang="c">
extern char *CPPhoneNumberCopyNormalized(char *);
extern char *CPPhoneNumberCopyNormalized(char *);
Line 13: Line 16:
</source>
</source>


== Header ==
== References ==
* http://github.com/kennytm/iphone-private-frameworks/blob/master/AppSupport/CPPhoneNumber.h
 
<references/>
 
== External links ==


{{occlass|library=AppSupport.framework|navbox=1}}
{{IPFHeader|AppSupport}}

Revision as of 17:39, 26 October 2014

CPPhoneNumber is a set of utility functions in AppSupport for handling phone numbers

Normalizing

Signature char *CPPhoneNumberCopyNormalized(char *);
Available in ? –

CPPhoneNumberCopyNormalized returns a normalized copy[1] of a phone number.

extern char *CPPhoneNumberCopyNormalized(char *);

...
	char *pn = CPPhoneNumberCopyNormalized("+1 (555) 555-5555");
	printf("%s\n", pn); // 15555555555
	free(pn);
...

References

External links