我有以下格式被接納進入我的存儲過程 hat=blue,yellow:=:jacket=leather,jean:=:shoes=nike,puma,umbro,converse
所以我願意接受這一點,並把它插入到一個臨時表作爲 product | inventory
-------------------
hat | blue
-------------------
hat | y
說我有這樣的數據: df <- data.frame(
text = c("Treatment1: This text is","on two lines","","Treatment2:This text","has","three lines","","Treatment3: This has one")
)
df
text
1 Treatmen
這將是一件非常基本的事情,但我已經忘記了如何去做。我只想刪除列表中每個字符串的最後一行,如果它以':'結尾。我有 desc1 = ['A sentence. Another sentence', 'One more sentence. A sentence that finishes with:', 'One last sentence. This also finishes with a:']
我想用我的最大允許字符的最後空間來分割字符串: 後市展望: 字符串名稱=「約翰·大衛·庫塔馬克·亨利Anthoney山姆「; 最大允許的字符: 因此,它應該是返回: John David Guetta MarkHenry
Anthoney Sam
實際結果: John David Guetta MarkHenry An
thoney Sam
代碼: public static List