Commit Graph

4 Commits

Author SHA1 Message Date
Mark Olesen
345a2a42f1 ENH: simplify method names for reading argList options and arguments
- use succincter method names that more closely resemble dictionary
  and HashTable method names. This improves method name consistency
  between classes and also requires less typing effort:

    args.found(optName)        vs.  args.optionFound(optName)
    args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
    ...
    args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
    args.read<scalar>(index)   vs.  args.argRead<scalar>(index)

- the older method names forms have been retained for code compatibility,
  but are now deprecated
2018-01-08 15:35:18 +01:00
Mark Olesen
d49929b210 ENH: improvements to stringOps format and split functions
- split now optionally retains empty substrings.
  Added split on fixed field width.

- Foam::name() now formats directly into string buffer, which a
  removes one layer of copying and also avoids using a non-constexpr
  in the temporary.

STYLE: explicit type narrowing on zero-padded output for ensight
2017-11-23 20:17:33 +01:00
Mark Olesen
fbdd16a293 ENH: add stringOps::splitAny, stringOps::splitSpace
- assists when building simple hand-rolled parsers.
  Also add string::split() taking a sub-string for the delimiter.
2017-08-14 10:36:12 +02:00
Mark Olesen
910967c070 ENH: add Foam::SubStrings container and stringOps::split
- generic means of holding ranges of substring iterators
2017-07-20 19:53:57 +02:00