This repository has been archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp core library.guid.tryparse
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-core-library > Guid > tryParse
Attempts to parse the input string to construct a new Guid object. If the string cannot be parsed, then undefined is returned.
Signature:
static tryParse(guid: string | undefined | null): Guid | undefined;
Parameter | Type | Description |
---|---|---|
guid | string | undefined | null | The input string. |
Returns:
Guid | undefined
The Guid object, or undefined if the string could not be parsed.
Example syntaxes accepted by this function:
-
"d5369f3bbd7a412a9c0f7f0650bb5489"
-
"d5369f3b-bd7a-412a-9c0f-7f0650bb5489"
-
"{d5369f3b-bd7a-412a-9c0f-7f0650bb5489}"
-
"/Guid(d5369f3b-bd7a-412a-9c0f-7f0650bb5489)/"