diff --git a/NIST/traditional/__init__.py b/NIST/traditional/__init__.py index cbcac309094350946fdce4af9432e113b6cc2662..81670d74db2b6943d97562d87af807b6181127d3 100644 --- a/NIST/traditional/__init__.py +++ b/NIST/traditional/__init__.py @@ -1008,6 +1008,18 @@ class NIST( object ): # ############################################################################ + def has_field(self, tag, idc = -1): + if type( tag ) == str: + ntype, tagid = tagSplitter( tag ) + + elif type( tag ) == tuple: + ntype, tagid = tag + + else: + raise notImplemented + + return tag in self.data[ ntype ][ idc ] + def get_field( self, tag, idc = -1 ): """ Get the content of a specific tag in the NIST object.