gpt4 book ai didi

javascript - 如何在选择中对齐

转载 作者:行者123 更新时间:2023-11-30 19:10:42 24 4
gpt4 key购买 nike

<分区>

如何对齐两行选择中的部分文本?

我需要对齐两行,每行中的字符数相同。每行以字符“|”结尾对齐。示例:

Lorem Ipsum alternative | other text
Lorem Ipsum | other text
$strdocumento="Lorem Ipsum alternative";
$strdocumento=str_pad($strdocumento, 50, '!', STR_PAD_RIGHT)."***";
$strdocumento=str_replace("!"," ",$strdocumento);

echo $strdocumento."|<br>";

//Line 2

$strdocumento="Lorem Ipsum ";
$strdocumento=str_pad($strdocumento, 50, '!', STR_PAD_RIGHT)."***";
$strdocumento=str_replace("!"," ",$strdocumento);

echo $strdocumento."|<br>";

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com