我想搜索一个文件并找到最后一个非空白字符是逗号的所有实例,并将该行下方的行向上移动。本质上,撤消行延续,如
private static final double SOME_NUMBERS[][] = {
{1.0, -6.032174644509064E-23},
{-0.25, -0.25},
{-0.16624879837036133, -2.6033824355191673E-8}
};
并将其转换为
private static final double SOME_NUMBERS[][] = {
{1.0, -6.032174644509064E-23}, {-0.25, -0.25}, {-0.16624879837036133, -2.6033824355191673E-8}
};
有没有好的方法来做到这一点?