tokenize_pure Function

public pure function tokenize_pure(s, ib, ntok) result(tokenize)

Uses

  • proc~~tokenize_pure~~UsesGraph proc~tokenize_pure tokenize_pure module~mod_memory mod_memory proc~tokenize_pure->module~mod_memory module~mod_io mod_io module~mod_memory->module~mod_io module~mod_constants mod_constants module~mod_memory->module~mod_constants iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_io->module~mod_constants module~mod_constants->iso_c_binding

This function is used to subsequently break a string into tokens. Tokens separators are any number of spaces.
If just the string is provided, the function returns the position of the first printable character;
If also ib is provided it saves the position of the first printable character after position ib (or ib itself) in ib and return the position of the last printable character before the first space after ib. If ntok is specified instead of a single token, ntok are returned. In case of last token hitten -1 is returned.
To divide a string follow the following scheme:
1. ib = tokenize(s)
2. ie = tokenize(s, ib)
3. tok1 = s(ib:ie)
4a. ib = ib+1
4b. ie = tokenize(s, ib)
5. tok2 = s(ib:ie)

Arguments

Type IntentOptional Attributes Name
character(len=OMMP_STR_CHAR_MAX), intent(in) :: s

String to subdivide in token

integer(kind=ip), intent(in), optional :: ib

Index where to start token research (input)/Index where token begins (output)

integer(kind=ip), intent(in), optional :: ntok

Number of token to be extracted

Return Value integer(kind=ip), (2)

Index where token ends.


Called by

proc~~tokenize_pure~~CalledByGraph proc~tokenize_pure tokenize_pure proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->proc~tokenize_pure proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->proc~mmpol_init_from_xyz proc~c_ommp_init_xyz C_ommp_init_xyz proc~c_ommp_init_xyz->proc~ommp_init_xyz

Contents