------------------------------------------------------------------------------------------------ check whether the given line contains an entity definition (i.e. starts with "# =")
| 142 | // ------------------------------------------------------------------------------------------------ |
| 143 | // check whether the given line contains an entity definition (i.e. starts with "#<number>=") |
| 144 | bool IsEntityDef(const std::string& snext) |
| 145 | { |
| 146 | if (snext[0] == '#') { |
| 147 | // it is only a new entity if it has a '=' after the |
| 148 | // entity ID. |
| 149 | for(std::string::const_iterator it = snext.begin()+1; it != snext.end(); ++it) { |
| 150 | if (*it == '=') { |
| 151 | return true; |
| 152 | } |
| 153 | if ((*it < '0' || *it > '9') && *it != ' ') { |
| 154 | break; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | return false; |
| 159 | } |
| 160 | |
| 161 | } |
| 162 |