我想在C#中開發一個算法,它可以獲取URL的數組列表並將它們輸出到大綱編號列表中。c#大綱編號
你可以想象我需要一些幫助。有沒有人有任何建議用於生成此列表的邏輯?
輸出示例:
1 - http://www.example.com/aboutus
1.2 - http://www.example.com/aboutus/page1
1.3 - http://www.example.com/aboutus/page2
1.3.1 - http://www.example.com/aboutus/page2/page3
1.3.1.1 - http://www.example.com/aboutus/page2/page3/page4
1.3.2 - http://www.example.com/aboutus/page5/page6
1.3.2.1 - http://www.example.com/aboutus/page5/page7/page9
1.3.2.2 - http://www.example.com/aboutus/page5/page8/page10
1.4 - http://www.example.com/aboutus/page10
1.4.1 - http://www.example.com/aboutus/page10/page11
1.4.2 - http://www.example.com/aboutus/page10/page12
1.1.5 - http://www.example.com/aboutus/page13
1.1.6 - http://www.example.com/aboutus/page14
1.1.6.1 - http://www.example.com/aboutus/page14/page15
1.1.6.2 - http://www.example.com/aboutus/page14/page16
1.1.6.3 - http://www.example.com/aboutus/page14/page17
...等等
嗨,1.3.2和1.3.2.1中是否有小故障?我會打電話給第二個1.3.3.1 - 是嗎? – Carsten
爲什麼這個>> 1.1.5 - http:// www.example.com/aboutus/page13' ?.爲什麼不是'1.5'? – Nawaz
列表最初是按您想要編號的順序排序的嗎?爲什麼'http:// www.example.com/aboutus/aboutus'不是1.1? –