diff options
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 41ee9993..16c600ef 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -557,14 +557,23 @@ serd_new_string(SerdStringView string); /** Create a new literal node from `str`. - Either `datatype_uri` or `lang` can be given, but not both, unless - `datatype_uri` is rdf:langString in which case it is ignored. + A plain literal has no datatype, but may have a language tag. The `lang` + may be NULL, in which case this is equivalent to `serd_new_string()`. */ SERD_API SerdNode* SERD_ALLOCATED -serd_new_literal(SerdStringView string, - SerdStringView datatype_uri, - SerdStringView lang); +serd_new_plain_literal(SerdStringView str, SerdStringView lang); + +/** + Create a new typed literal node from `str`. + + A typed literal has no language tag, but may have a datatype. The + `datatype` may be NULL, in which case this is equivalent to + `serd_new_string()`. +*/ +SERD_API +SerdNode* SERD_ALLOCATED +serd_new_typed_literal(SerdStringView str, SerdStringView datatype_uri); /// Create a new blank node SERD_API |