ReplaceEntitiesString replaces XML entities in the given string according to the provided entity map.
(data string, em map[string][]byte)
| 61 | // ReplaceEntitiesString replaces XML entities in the given string |
| 62 | // according to the provided entity map. |
| 63 | func ReplaceEntitiesString(data string, em map[string][]byte) string { |
| 64 | return replaceEntities(data, em, strings.IndexByte) |
| 65 | } |
| 66 | |
| 67 | func replaceEntities[T string | []byte]( |
| 68 | data T, |