轩辕龙儿 轩辕龙儿

力扣每日一题

题目:[1410. HTML 实体解析器](https://leetcode.cn/problems/html-entity-parser/description/)

日期:2023-11-23

用时:4 m 57 s

时间:34ms

内存:42.68MB

代码:

class Solution {
    public String entityParser(String text) {
        return text.replaceAll(""", "\"")
        .replaceAll("'","'")
        .replaceAll(">",">")
        .replaceAll("&lt;","<")
        .replaceAll("&frasl;","/")
        .replaceAll("&amp;","&");
    }
}

评论

© 2025 龙儿之家