.. index:: single: atom
.. _atom/0:

.. rst-class:: right

**object**

``atom``
========

Atom data type predicates.

| **Availability:** 
|    ``logtalk_load(types(loader))``

| **Author:** Paulo Moura
| **Version:** 1:9:0
| **Date:** 2023-04-12

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Extends:**
|    ``public`` :ref:`atomic <atomic/0>`
| **Uses:**
|    :ref:`user <user/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`comparingp/0::(<)/2`  :ref:`comparingp/0::(=:=)/2`  :ref:`comparingp/0::(=<)/2`  :ref:`comparingp/0::(=\=)/2`  :ref:`comparingp/0::(>)/2`  :ref:`comparingp/0::(>=)/2`  :ref:`termp/0::check/1`  :ref:`termp/0::depth/2`  :ref:`termp/0::ground/1`  :ref:`termp/0::new/1`  :ref:`termp/0::numbervars/1`  :ref:`termp/0::numbervars/3`  :ref:`termp/0::occurs/2`  :ref:`termp/0::singletons/2`  :ref:`termp/0::subsumes/2`  :ref:`termp/0::subterm/2`  :ref:`termp/0::valid/1`  :ref:`termp/0::variables/2`  :ref:`termp/0::variant/2`  :ref:`termp/0::varnumbers/2`  :ref:`termp/0::varnumbers/3`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: replace_sub_atom/4
.. _atom/0::replace_sub_atom/4:

``replace_sub_atom/4``
^^^^^^^^^^^^^^^^^^^^^^

Replaces all occurrences of ``Old`` by ``New`` in ``Input`` returning ``Output``. Returns ``Input`` if ``Old`` is the empty atom. Fails when ``Output`` does not unify with the resulting atom.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``replace_sub_atom(Old,New,Input,Output)``
| **Mode and number of proofs:**
|    ``replace_sub_atom(+atom,+atom,+atom,?atom)`` - ``zero_or_one``


------------

.. index:: split/3
.. _atom/0::split/3:

``split/3``
^^^^^^^^^^^

Splits an atom at a given delimiter into a list of sub-atoms.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``split(Atom,Delimiter,SubAtoms)``
| **Mode and number of proofs:**
|    ``split(+atom,+atom,-list(atom))`` - ``one``


------------

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

