Look for a group with the given name.
| 1620 | |
| 1621 | // Look for a group with the given name. |
| 1622 | static const UGroup* LookupGroup(const StringPiece& name, |
| 1623 | const UGroup *groups, int ngroups) { |
| 1624 | // Simple name lookup. |
| 1625 | for (int i = 0; i < ngroups; i++) |
| 1626 | if (StringPiece(groups[i].name) == name) |
| 1627 | return &groups[i]; |
| 1628 | return NULL; |
| 1629 | } |
| 1630 | |
| 1631 | // Look for a POSIX group with the given name (e.g., "[:^alpha:]") |
| 1632 | static const UGroup* LookupPosixGroup(const StringPiece& name) { |
no test coverage detected